| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2022-04-26 | Fixed #33655 -- Removed unnecessary constant from GROUP BY clause for ↵ | marcperrinoptel | |
| QuerySet.exists(). | |||
| 2022-04-11 | Fixed CVE-2022-28346 -- Protected QuerySet.annotate(), aggregate(), and ↵ | Mariusz Felisiak | |
| extra() against SQL injection in column aliases. Thanks Splunk team: Preston Elder, Jacob Davis, Jacob Moore, Matt Hanson, David Briggs, and a security researcher: Danylo Dmytriiev (DDV_UA) for the report. | |||
| 2022-03-31 | Fixed #33397 -- Corrected resolving output_field for ↵ | Luke Plant | |
| DateField/DateTimeField/TimeField/DurationFields. This includes refactoring of CombinedExpression._resolve_output_field() so it no longer uses the behavior inherited from Expression of guessing same output type if argument types match, and instead we explicitly define the output type of all supported operations. This also makes nonsensical operations involving dates (e.g. date + date) raise a FieldError, and adds support for automatically inferring output_field for cases such as: * date - date * date + duration * date - duration * time + duration * time - time | |||
| 2022-03-24 | Refs #32365 -- Removed internal uses of utils.timezone.utc alias. | Carlton Gibson | |
| Remaining test case ensures that uses of the alias are mapped canonically by the migration writer. | |||
| 2022-02-22 | Removed redundant QuerySet.all() calls in docs and tests. | Nick Pope | |
| Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager. | |||
| 2022-02-07 | Refs #33476 -- Refactored code to strictly match 88 characters line length. | Mariusz Felisiak | |
| 2022-02-07 | Refs #33476 -- Reformatted code with Black. | django-bot | |
| 2022-01-31 | Fixed #33468 -- Fixed QuerySet.aggregate() after annotate() crash on ↵ | Mariusz Felisiak | |
| aggregates with default. Thanks Adam Johnson for the report. | |||
| 2021-12-02 | Fixed #33282 -- Fixed a crash when OR'ing subquery and aggregation lookups. | Simon Charette | |
| As a QuerySet resolves to Query the outer column references grouping logic should be defined on the latter and proxied from Subquery for the cases where get_group_by_cols is called on unresolved expressions. Thanks Antonio Terceiro for the report and initial patch. | |||
| 2021-09-29 | Fixed #33141 -- Renamed Expression.empty_aggregate_value to ↵ | David Wobrock | |
| empty_result_set_value. | |||
| 2021-09-01 | Fixed #33073 -- Fixed queryset crash with aggregation and empty/extra ↵ | David Wobrock | |
| queryset annotation. | |||
| 2021-08-24 | Refs #10929 -- Allowed NowUTC SQL customization for third-party backends. | Tim Graham | |
| 2021-07-19 | Fixed #10929 -- Added default argument to aggregates. | Nick Pope | |
| Thanks to Simon Charette and Adam Johnson for the reviews. | |||
| 2021-07-02 | Refs #26430 -- Re-introduced empty aggregation optimization. | Simon Charette | |
| The introduction of the Expression.empty_aggregate_value interface allows the compilation stage to enable the EmptyResultSet optimization if all the aggregates expressions implement it. This also removes unnecessary RegrCount/Count.convert_value() methods. Disabling the empty result set aggregation optimization when it wasn't appropriate prevented None returned for a Count aggregation value. Thanks Nick Pope for the review. | |||
| 2021-07-02 | Fixed #26430 -- Fixed coalesced aggregation of empty result sets. | Simon Charette | |
| Disable the EmptyResultSet optimization when performing aggregation as it might interfere with coalescence. | |||
| 2021-02-24 | Fixed #32478 -- Included nested columns referenced by subqueries in GROUP BY ↵ | Simon Charette | |
| on aggregations. Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Refs #31094, #31150. Thanks Igor Pejic for the report. | |||
| 2020-12-10 | Fixed #32178 -- Allowed database backends to skip tests and mark expected ↵ | Hasan Ramezani | |
| failures. Co-authored-by: Tim Graham <timograham@gmail.com> | |||
| 2020-11-27 | Fixed #25534, Fixed #31639 -- Added support for transform references in ↵ | Ian Foote | |
| expressions. Thanks Mariusz Felisiak and Simon Charette for reviews. | |||
| 2020-11-06 | Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly. | Hasan Ramezani | |
| This also replaces assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() where appropriate. Co-authored-by: Peter Inglesby <peter.inglesby@gmail.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> | |||
| 2020-11-03 | Fixed #32166 -- Removed redundant definition of Greatest in ↵ | Sicong | |
| test_expression_on_aggregation. | |||
| 2020-10-21 | Fixed #26390 -- Disabled grouping by Random(). | Étienne Beaulé | |
| Thanks to Tzu-ping Chung for the tests. | |||
| 2020-09-29 | Fixed #31880 -- Made QuerySet.aggregate() raise FieldError when aggregating ↵ | David Wobrock | |
| over aggregation aliases. | |||
| 2020-08-17 | Fixed #31888 -- Avoided module-level MySQL queries in tests. | Ahmad A. Hussein | |
| 2020-07-15 | Refs #30446 -- Removed unnecessary Value(..., output_field) in docs and tests. | Simon Charette | |
| 2020-07-15 | Fixed #30446 -- Resolved Value.output_field for stdlib types. | Simon Charette | |
| This required implementing a limited form of dynamic dispatch to combine expressions with numerical output. Refs #26355 should eventually provide a better interface for that. | |||
| 2020-03-25 | Fixed #31377 -- Disabled grouping by aliases on ↵ | Hasan Ramezani | |
| QuerySet.values()/values_list() when they collide with field names. Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Thanks Holovashchenko Vadym for the report. | |||
| 2020-03-03 | Refs #31331 -- Checked ONLY_FULL_GROUP_BY mode in ↵ | Mariusz Felisiak | |
| AggregateTestCase.test_aggregation_subquery_annotation_multivalued(). | |||
| 2020-03-03 | Fixed #31150 -- Included subqueries that reference related fields in GROUP ↵ | Mariusz Felisiak | |
| BY clauses. Thanks Johannes Hoppe for the report. Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Co-authored-by: Simon Charette <charette.s@gmail.com> | |||
| 2020-02-04 | Simplified imports from django.db and django.contrib.gis.db. | Nick Pope | |
| 2020-02-03 | Fixed #31217 -- Made QuerySet.values()/values_list() group by not selected ↵ | Mariusz Felisiak | |
| annotations with aggregations used in order_by(). Regression in 59b4e99dd00b9c36d56055b889f96885995e4240. Thanks Jon Dufresne for the report and Simon Charette for the review. | |||
| 2020-01-15 | Refs #31136 -- Made QuerySet.values()/values_list() group only by selected ↵ | Mariusz Felisiak | |
| annotation. Regression in 0f843fdd5b9b2f2307148465cd60f4e1b2befbb4. | |||
| 2020-01-04 | Fixed #31136 -- Disabled grouping by aliases on QuerySet.values()/values_list(). | Mariusz Felisiak | |
| Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Thanks Sigurd Ljødal for the report. | |||
| 2019-12-23 | Fixed #31109 -- Disabled grouping by aliases on QuerySet.exists(). | Simon Charette | |
| Clearing the SELECT clause in Query.has_results was orphaning GROUP BY references to it. Thanks Thierry Bastian for the report and Baptiste Mispelon for the bisect. Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. | |||
| 2019-12-19 | Fixed #31094 -- Included columns referenced by subqueries in GROUP BY on ↵ | Simon Charette | |
| aggregations. Thanks Johannes Hoppe for the report. Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> | |||
| 2019-12-19 | Refs #31094 -- Added test for not using aliases in GROUP BY clauses. | Simon Charette | |
| 2019-11-18 | Relaxed some query ordering assertions in tests. | Tim Graham | |
| It accounts for differences seen on cockroachdb. | |||
| 2019-07-31 | Fixed #30665 -- Added support for distinct argument to Avg() and Sum(). | Étienne Beaulé | |
| 2019-07-31 | Moved test for distinct Count() to a separate test case. | Étienne Beaulé | |
| 2019-06-10 | Fixed #30548 -- Improved exception when expression contains mixed types. | CruxBox | |
| 2019-03-21 | Fixed #30158 -- Avoided unnecessary subquery group by on aggregation. | Simon Charette | |
| Subquery annotations can be omitted from the GROUP BY clause on aggregation as long as they are not explicitly grouped against. Thanks Jonny Fuller for the report. | |||
| 2019-01-21 | Fixed #30120 -- Fixed invalid SQL in distinct aggregate. | Simon Charette | |
| Regression in bc05547cd8c1dd511c6b6a6c873a1bc63417b111 (refs #28658). | |||
| 2019-01-14 | Refs #28643 -- Changed Avg() to use NumericOutputFieldMixin. | Nick Pope | |
| Keeps precision instead of forcing DecimalField to FloatField. | |||
| 2019-01-09 | Fixed #28658 -- Added DISTINCT handling to the Aggregate class. | Simon Charette | |
| 2018-08-23 | Fixed #29048 -- Added **extra_context to database function as_vendor() methods. | priyanshsaxena | |
| 2018-02-02 | Simplified aggregation.tests. | Mariusz Felisiak | |
| 2017-07-21 | Refs #24887 -- Stopped mutating a test expression during as_sql(). | Simon Charette | |
| Also defined an explicit output_field as it was mixing an expression with an IntegerField() with one with a DecimalField(). | |||
| 2017-07-11 | Fixed #28382 -- Prevented BaseExpression._output_field from being set if ↵ | Sergey Fedoseev | |
| _resolve_output_field() fails. | |||
| 2017-06-29 | Fixed #28277 -- Added validation of QuerySet.annotate() and aggregate() args. | Mariusz Felisiak | |
| Thanks Tim Graham and Nick Pope for reviews. | |||
| 2017-06-01 | Refs #23968 -- Removed unnecessary lists, generators, and tuple calls. | Jon Dufresne | |
| 2017-01-25 | Refs #23919 -- Replaced super(ClassName, self) with super(). | chillaranand | |
