[Django] #28658: Move DISTINCT handling to the Aggregate base class.

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Django] #28658: Move DISTINCT handling to the Aggregate base class.

Django
#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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28658: Move DISTINCT handling to the Aggregate base class.

Django
#28658: Move DISTINCT handling to the Aggregate base class.
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * needs_better_patch:  0 => 1
 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/9174 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/28658#comment:1>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.691e0776f98f50194694053cf92fdc3c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28658: Move DISTINCT handling to the Aggregate base class.

Django
In reply to this post by Django
#28658: Move DISTINCT handling to the Aggregate base class.
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * stage:  Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/28658#comment:2>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.16a3e25eb4d4675321faff587e811392%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28658: Move DISTINCT handling to the Aggregate base class.

Django
In reply to this post by Django
#28658: Move DISTINCT handling to the Aggregate base class.
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * needs_better_patch:  1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/28658#comment:3>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.5a3a314e053eb3a3f57da3b7946cb5c1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28658: Move DISTINCT handling to the Aggregate base class.

Django
In reply to this post by Django
#28658: Move DISTINCT handling to the Aggregate base class.
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/28658#comment:4>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.e13366fc71918deddf723f4736a3f732%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28658: Move DISTINCT handling to the Aggregate base class.

Django
In reply to this post by Django
#28658: Move DISTINCT handling to the Aggregate base class.
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * needs_better_patch:  1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/28658#comment:5>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.07d2cff15d179ef62ad3e525308ee999%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28658: Move DISTINCT handling to the Aggregate base class.

Django
In reply to this post by Django
#28658: Move DISTINCT handling to the Aggregate base class.
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"bc05547cd8c1dd511c6b6a6c873a1bc63417b111" bc05547]:
 {{{
 #!CommitTicketReference repository=""
 revision="bc05547cd8c1dd511c6b6a6c873a1bc63417b111"
 Fixed #28658 -- Added DISTINCT handling to the Aggregate class.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28658#comment:6>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.143153ce6dbc2cb882f7b75bc3a09dec%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28658: Move DISTINCT handling to the Aggregate base class.

Django
In reply to this post by Django
#28658: Move DISTINCT handling to the Aggregate base class.
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

 Regression reported in #30120

--
Ticket URL: <https://code.djangoproject.com/ticket/28658#comment:7>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.516e3b88c628c83daa945ba9994b8c77%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28658: Move DISTINCT handling to the Aggregate base class.

Django
In reply to this post by Django
#28658: Move DISTINCT handling to the Aggregate base class.
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

 In [changeset:"6516e49262546238d02f6ca37b74ee0e67dead0a" 6516e492]:
 {{{
 #!CommitTicketReference repository=""
 revision="6516e49262546238d02f6ca37b74ee0e67dead0a"
 [2.2.x] Fixed #30120 -- Fixed invalid SQL in distinct aggregate.

 Regression in bc05547cd8c1dd511c6b6a6c873a1bc63417b111 (refs #28658).
 Backport of 65858119d23e37872505a4476e7141c33981fb50 from master.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28658#comment:8>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.1650892a4e65183ece5b69c0c5c98452%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #28658: Move DISTINCT handling to the Aggregate base class.

Django
In reply to this post by Django
#28658: Move DISTINCT handling to the Aggregate base class.
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
         Type:                       |  Charette
  Cleanup/optimization               |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

 In [changeset:"65858119d23e37872505a4476e7141c33981fb50" 65858119]:
 {{{
 #!CommitTicketReference repository=""
 revision="65858119d23e37872505a4476e7141c33981fb50"
 Fixed #30120 -- Fixed invalid SQL in distinct aggregate.

 Regression in bc05547cd8c1dd511c6b6a6c873a1bc63417b111 (refs #28658).
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28658#comment:9>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.dd4a3359bd7ce587f3b86a4ae10a1486%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.