| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Special thanks to Hannes Ljungberg for finding multiple implementation
gaps.
Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for
reviews.
|
|
|
|
|
|
|
|
| |
window expression.
Regression in f387d024fc75569d2a4a338bfda76cc2f328f627.
Co-authored-by: Jannis Vajen <jvajen@gmail.com>
|
|
|
|
|
|
|
|
| |
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.
https://github.com/psf/black/releases/tag/23.1.0
|
|
|
|
| |
Thanks Simon Charette for reviews.
|
|
|
| |
Available since Python 3.10 where it was reintroduced.
|
|
|
|
|
|
| |
when nulls_first/nulls_last=False is passed.
Per deprecation timeline.
|
|
|
|
|
| |
Also avoid an unnecessary pushdown when aggregating over a query that doesn't
have aggregate annotations.
|
|
|
|
|
|
| |
Adjusting WhereNode.as_sql() to raise an exception when encoutering a
full match just like with empty matches ensures that all case are
explicitly handled.
|
| |
|
|
|
|
|
| |
Recent refactors allowed GROUP BY aliasing allowed for aliasing to be
entirely handled by the sql.Query.set_group_by and compiler layers.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
This ensures explicit grouping from using values() before annotating an
aggregate function groups by selected aliases if supported.
The GROUP BY feature is disabled on Oracle because it doesn't support it.
|
|
|
|
| |
MOD operator.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
containing Exists.
A more in-depth solution is likely to make sure that we always GROUP BY
selected annotations or revisit how we use Query.exists() in the Exists
expression but that requires extra work that isn't suitable for a
backport.
Regression in e5a92d400acb4ca6a8e1375d1ab8121f2c7220be.
Thanks Fernando Flores Villaça for the report.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds support for joint predicates against window annotations through
subquery wrapping while maintaining errors for disjointed filter
attempts.
The "qualify" wording was used to refer to predicates against window
annotations as it's the name of a specialized Snowflake extension to
SQL that is to window functions what HAVING is to aggregates.
While not complete the implementation should cover most of the common
use cases for filtering against window functions without requiring
the complex subquery pushdown and predicate re-aliasing machinery to
deal with disjointed predicates against columns, aggregates, and window
functions.
A complete disjointed filtering implementation should likely be
deferred until proper QUALIFY support lands or the ORM gains a proper
subquery pushdown interface.
|
|
|
|
|
|
|
| |
The latter allows for more generic use cases beyond the currently
limited ones constraints validation has.
Refs #28333, #30581.
|
|
|
|
|
| |
When() on Oracle.
Follow up to 036bb2b74afb50a71e7a945e8dd83499b603ac3a.
|
|
|
|
| |
Thanks shukryzablah for the report.
|
|
|
|
|
| |
Thanks Adam Zahradník for the report.
Bug in 667105877e6723c6985399803a364848891513cc.
|
|
|
|
|
| |
Thanks Kia for the report.
Regression in e06dc4571ea9fd5723c8029959b95808be9f8812.
|
|
|
|
|
| |
and Expression.asc()/desc().
Thanks Allen Jonathan David for the initial patch.
|
|
|
|
|
|
| |
contains expressions.
Thanks Simon Charette for the review.
|
|
|
|
| |
Thanks Simon Charette, Keryn Knight, and Mariusz Felisiak for reviews.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Exists() with empty queryset.
Regression in b7d1da5a62fe4141beff2bfea565f7ef0038c94c.
|
|
|
|
|
|
| |
queryset.
Thanks Tobias Bengfort for the report.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This greatly simplifies the implementation of contrib.postgres'
OrderableAggMixin and allows for reuse in Window expressions.
|
|
|
|
| |
SQLite.
|
| |
|
|
|
|
| |
Thanks Simon Charette for the review and implementation idea.
|
|
|
|
| |
empty_result_set_value.
|
|
|
|
|
|
|
|
| |
QuerySet.filter().
Thanks Hannes Ljungberg and Simon Charette for reviews.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
OrderBy expressions.
Regression in c8b659430556dca0b2fe27cf2ea0f8290dbafecd.
Thanks Kevin Marsh for the report.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
deconstruction.
Subquery deconstruction support required implementing complex and
expensive equality rules for sql.Query objects for little benefit as
the latter cannot themselves be made deconstructible to their reference
to model classes.
Making Expression @deconstructible and not BaseExpression allows
interested parties to conform to the "expression" API even if they are
not deconstructible as it's only a requirement for expressions allowed
in Model fields and meta options (e.g. constraints, indexes).
Thanks Phillip Cutter for the report.
This also fixes a performance regression in bbf141bcdc31f1324048af9233583a523ac54c94.
|
|
|
|
| |
scalar values on SQLite.
|
|
|
| |
Unnecessary since 7286eaf681d497167cd7dc8b70ceebfcf5cd21ad.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
on aggregations.
Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80.
Refs #31094, #31150.
Thanks Igor Pejic for the report.
|
|
|
|
|
|
| |
Thanks Simon Charette, Mads Jensen, and Mariusz Felisiak for reviews.
Co-authored-by: Markus Holtermann <info@markusholtermann.eu>
|
|
|
|
|
|
| |
Thanks Gordon Wrigley for the report.
Regression in df32fd42b84cc6dbba173201f244491b0d154a63.
|