summaryrefslogtreecommitdiff
path: root/tests/aggregation
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2022-09-28 00:44:46 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-10-06 11:38:03 +0200
commit3d734c09ff0138441dfe0a59010435871d17950f (patch)
tree26db20983d0b6931bfc7537a81cdc310e7a2fade /tests/aggregation
parent04518e310d4552ff7595a34f5a7f93487d78a406 (diff)
Refs #33992 -- Refactored subquery grouping logic.
This required moving the combined queries slicing logic to the compiler in order to allow Query.exists() to be called at expression resolving time. It allowed for Query.exists() to be called at Exists() initialization time and thus ensured that get_group_by_cols() was operating on the terminal representation of the query that only has a single column selected.
Diffstat (limited to 'tests/aggregation')
-rw-r--r--tests/aggregation/tests.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py
index 5ec12ccd64..044dcdc690 100644
--- a/tests/aggregation/tests.py
+++ b/tests/aggregation/tests.py
@@ -1440,9 +1440,7 @@ class AggregateTestCase(TestCase):
.annotate(cnt=Count("isbn"))
.filter(cnt__gt=1)
)
- query = publishers_having_more_than_one_book_qs.query.exists(
- using=connection.alias
- )
+ query = publishers_having_more_than_one_book_qs.query.exists()
_, _, group_by = query.get_compiler(connection=connection).pre_sql_setup()
self.assertEqual(len(group_by), 1)