<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/django.git/tests/aggregation, branch main</title>
<subtitle>github.com: django/django.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/django.git/'/>
<entry>
<title>Fixed #34464 -- Fixed queryset aggregation over group by reference.</title>
<updated>2023-04-07T04:57:32+00:00</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2023-04-06T12:19:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/django.git/commit/?id=9daf8b4109c3e133eb57349bb44d73cc60c5773c'/>
<id>9daf8b4109c3e133eb57349bb44d73cc60c5773c</id>
<content type='text'>
Regression in 59bea9efd2768102fc9d3aedda469502c218e9b7.

Refs #28477.

Thanks Ian Cubitt for the report.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Regression in 59bea9efd2768102fc9d3aedda469502c218e9b7.

Refs #28477.

Thanks Ian Cubitt for the report.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed #34255 -- Made PostgreSQL backend use client-side parameters binding with psycopg version 3.</title>
<updated>2023-01-17T07:24:08+00:00</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2023-01-16T09:22:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/django.git/commit/?id=0e2649fdf40cedc5be7e2c0e5f7711f315e36b84'/>
<id>0e2649fdf40cedc5be7e2c0e5f7711f315e36b84</id>
<content type='text'>
Thanks Guillaume Andreu Sabater for the report.

Co-authored-by: Florian Apolloner &lt;apollo13@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Thanks Guillaume Andreu Sabater for the report.

Co-authored-by: Florian Apolloner &lt;apollo13@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed #34176 -- Fixed grouping by ambiguous aliases.</title>
<updated>2023-01-09T09:52:51+00:00</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2023-01-06T14:10:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/django.git/commit/?id=dd68af62b2b27ece50d434f6a351877212e15c3f'/>
<id>dd68af62b2b27ece50d434f6a351877212e15c3f</id>
<content type='text'>
Regression in b7b28c7c189615543218e81319473888bc46d831.

Refs #31377.

Thanks Shai Berger for the report and reviews.

test_aggregation_subquery_annotation_values_collision() has been
updated as queries that are explicitly grouped by a subquery should
always be grouped by it and not its outer columns even if its alias
collides with referenced table columns. This was not possible to
accomplish at the time 10866a10 landed because we didn't have compiler
level handling of colliding aliases.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Regression in b7b28c7c189615543218e81319473888bc46d831.

Refs #31377.

Thanks Shai Berger for the report and reviews.

test_aggregation_subquery_annotation_values_collision() has been
updated as queries that are explicitly grouped by a subquery should
always be grouped by it and not its outer columns even if its alias
collides with referenced table columns. This was not possible to
accomplish at the time 10866a10 landed because we didn't have compiler
level handling of colliding aliases.
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed unnecessary commas in tests.</title>
<updated>2022-12-21T10:41:29+00:00</updated>
<author>
<name>Mariusz Felisiak</name>
<email>felisiak.mariusz@gmail.com</email>
</author>
<published>2022-12-21T10:41:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/django.git/commit/?id=3b24a3fa337bedc11352a17952cb9c3f77f9b9f2'/>
<id>3b24a3fa337bedc11352a17952cb9c3f77f9b9f2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed #31679 -- Delayed annotating aggregations.</title>
<updated>2022-11-23T16:46:07+00:00</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2022-11-23T02:49:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/django.git/commit/?id=1297c0d0d76a708017fe196b61a0ab324df76954'/>
<id>1297c0d0d76a708017fe196b61a0ab324df76954</id>
<content type='text'>
By avoiding to annotate aggregations meant to be possibly pushed to an
outer query until their references are resolved it is possible to
aggregate over a query with the same alias.

Even if #34176 is a convoluted case to support, this refactor seems
worth it given the reduction in complexity it brings with regards to
annotation removal when performing a subquery pushdown.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By avoiding to annotate aggregations meant to be possibly pushed to an
outer query until their references are resolved it is possible to
aggregate over a query with the same alias.

Even if #34176 is a convoluted case to support, this refactor seems
worth it given the reduction in complexity it brings with regards to
annotation removal when performing a subquery pushdown.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #28477 -- Fixed handling aliased annotations on aggregation.</title>
<updated>2022-11-14T04:45:33+00:00</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2022-11-14T04:45:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/django.git/commit/?id=10037130c123cd747d32a14a9ba47e0c5c9a37d1'/>
<id>10037130c123cd747d32a14a9ba47e0c5c9a37d1</id>
<content type='text'>
Just like when using .annotate(), the .alias() method will generate the
necessary JOINs to resolve the alias even if not selected.

Since these JOINs could be multi-valued non-selected aggregates must be
considered to require subquery wrapping as a GROUP BY is required to
combine duplicated tuples from the base table.

Regression in 59bea9efd2768102fc9d3aedda469502c218e9b7.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just like when using .annotate(), the .alias() method will generate the
necessary JOINs to resolve the alias even if not selected.

Since these JOINs could be multi-valued non-selected aggregates must be
considered to require subquery wrapping as a GROUP BY is required to
combine duplicated tuples from the base table.

Regression in 59bea9efd2768102fc9d3aedda469502c218e9b7.</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed #28477 -- Stripped unused annotations on aggregation.</title>
<updated>2022-11-09T12:22:14+00:00</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2022-11-06T04:28:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/django.git/commit/?id=59bea9efd2768102fc9d3aedda469502c218e9b7'/>
<id>59bea9efd2768102fc9d3aedda469502c218e9b7</id>
<content type='text'>
Also avoid an unnecessary pushdown when aggregating over a query that doesn't
have aggregate annotations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also avoid an unnecessary pushdown when aggregating over a query that doesn't
have aggregate annotations.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #27849 -- Fixed filtered aggregates crash on filters that match everything.</title>
<updated>2022-11-07T08:05:24+00:00</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2022-11-07T08:01:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/django.git/commit/?id=967f8750ab63f9ca74ce63ada580ccc5b10b3f3b'/>
<id>967f8750ab63f9ca74ce63ada580ccc5b10b3f3b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #27849 -- Added test for filtered aggregates with empty conditions.</title>
<updated>2022-11-07T07:57:40+00:00</updated>
<author>
<name>Simon Charette</name>
<email>charette.s@gmail.com</email>
</author>
<published>2022-11-07T07:57:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/django.git/commit/?id=77cf70ea9699c3c4e74663955998753d70f65166'/>
<id>77cf70ea9699c3c4e74663955998753d70f65166</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to assertQuerySetEqual().</title>
<updated>2022-10-08T06:07:38+00:00</updated>
<author>
<name>Gregor Gärtner</name>
<email>code@gregorgaertner.de</email>
</author>
<published>2022-09-24T10:29:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/django.git/commit/?id=f0c06f8ab7904e1fd082f2de57337f6c7e05f177'/>
<id>f0c06f8ab7904e1fd082f2de57337f6c7e05f177</id>
<content type='text'>
Co-Authored-By: Michael Howitz &lt;mh@gocept.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-Authored-By: Michael Howitz &lt;mh@gocept.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
