1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00
django/tests/expressions_window
Simon Charette e76cc93b01
Fixed #34987 -- Fixed queryset crash when mixing aggregate and window annotations.
Regression in f387d024fc.

Just like `OrderByList` the `ExpressionList` expression used to wrap
`Window.partition_by` must implement `get_group_by_cols` to ensure the
necessary grouping when mixing window expressions with aggregate
annotations is performed against the partition members and not the
partition expression itself.

This is necessary because while `partition_by` is implemented as
a source expression of `Window` it's actually a fragment of the WINDOW
expression at the SQL level and thus it should result in a group by its
members and not the sum of them.

Thanks ElRoberto538 for the report.
2023-11-23 06:09:08 +01:00
..
__init__.py
models.py Refs #28333 -- Added partial support for filtering against window functions. 2022-08-15 08:26:26 +02:00
tests.py Fixed #34987 -- Fixed queryset crash when mixing aggregate and window annotations. 2023-11-23 06:09:08 +01:00