#28658: Move DISTINCT handling to the Aggregate base class.
-------------------------------------+-------------------------------------
Reporter: Simon | Owner: Simon Charette
Charette |
Type: | Status: assigned
Cleanup/optimization |
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Django ships with a few `Aggregate` subclasses that expose a `distinct`
kwarg in order to inject a `DISTINCT` clause on compilation.
Since `DISTINCT` is repeatedly used by subclasses and likely to be useful
for custom `Aggregate` subclasses (PostgreSQL supports `DISTINCT` on all
aggregate functions, SQLite on all aggregates with a single argument, ...)
I suggest we handle it in the `Aggregate` base class.
We should be able to rely on `DatebaseOperations.check_expression_support`
to prevent `distinct=True` from being passed to aggregates not supporting
it on a backend basis.
--
Ticket URL: <https://code.djangoproject.com/ticket/28658>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.cc0c28a488a8aa163eaf149c4c684403%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.