1
0
mirror of https://github.com/django/django.git synced 2024-12-27 03:25:58 +00:00
django/docs/releases/4.2.8.txt
Simon Charette 95dec210e8 [5.0.x] 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.
Backport of e76cc93b01 from main
2023-11-23 06:09:58 +01:00

23 lines
781 B
Plaintext

==========================
Django 4.2.8 release notes
==========================
*Expected December 4, 2023*
Django 4.2.8 fixes several bugs in 4.2.7 and adds compatibility with Python
3.12.
Bugfixes
========
* Fixed a regression in Django 4.2 that caused :option:`makemigrations --check`
to stop displaying pending migrations (:ticket:`34457`).
* Fixed a regression in Django 4.2 that caused a crash of
``QuerySet.aggregate()`` with aggregates referencing other aggregates or
window functions through conditional expressions (:ticket:`34975`).
* Fixed a regression in Django 4.2 that caused a crash when annotating a
``QuerySet`` with a ``Window`` expressions composed of a ``partition_by``
clause mixing field types and aggregation expressions (:ticket:`34987`).