[Django] #30120: Query syntax error with condition and distinct combination

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

[Django] #30120: Query syntax error with condition and distinct combination

Django
#30120: Query syntax error with condition and distinct combination
-------------------------------------+-------------------------------------
               Reporter:  Claude     |          Owner:  nobody
  Paroz                              |
                   Type:  Bug        |         Status:  new
              Component:  Database   |        Version:  2.2
  layer (models, ORM)                |
               Severity:  Release    |       Keywords:
  blocker                            |
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 A `Count` annotation containing both a `Case` condition and a
 `distinct=True` param produces a query error on Django 2.2 (whatever the
 db backend). A space is missing at least (`... COUNT(DISTINCTCASE WHEN
 ...`).

--
Ticket URL: <https://code.djangoproject.com/ticket/30120>
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/050.24a7740b2fc2b62f259530c0ea1eac68%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30120: Query syntax error with condition and distinct combination

Django
#30120: Query syntax error with condition and distinct combination
-------------------------------------+-------------------------------------
     Reporter:  Claude Paroz         |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

 * Attachment "query_test.diff" added.

 Failing test example

--
Ticket URL: <https://code.djangoproject.com/ticket/30120>
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/065.1fcee30f52c9c6b6b97292525764f601%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30120: Query syntax error with condition and distinct combination

Django
In reply to this post by Django
#30120: Query syntax error with condition and distinct combination
-------------------------------------+-------------------------------------
     Reporter:  Claude Paroz         |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

 Bisected to [bc05547cd8c1dd511c6b6a6c873a1bc63417b111] Fixed #28658 --
 Added DISTINCT handling to the Aggregate class.

--
Ticket URL: <https://code.djangoproject.com/ticket/30120#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/065.4138777931b2e0e44fe4d4a40bcac69a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30120: Query syntax error with condition and distinct combination

Django
In reply to this post by Django
#30120: Query syntax error with condition and distinct combination
-------------------------------------+-------------------------------------
     Reporter:  Claude Paroz         |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * owner:  nobody => Simon Charette
 * status:  new => assigned
 * stage:  Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/30120#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/065.b1f1d91729c77bfb0d278cfd4050fdd4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30120: Query syntax error with condition and distinct combination

Django
In reply to this post by Django
#30120: Query syntax error with condition and distinct combination
-------------------------------------+-------------------------------------
     Reporter:  Claude Paroz         |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Release blocker      |               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):

 * has_patch:  0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/30120#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/065.5b2a18a4076a0d4ef773887f74f70153%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30120: Query syntax error with condition and distinct combination

Django
In reply to this post by Django
#30120: Query syntax error with condition and distinct combination
-------------------------------------+-------------------------------------
     Reporter:  Claude Paroz         |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

 * stage:  Accepted => Ready for checkin


Comment:

 Thanks for the quick fix!

--
Ticket URL: <https://code.djangoproject.com/ticket/30120#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/065.c1986f7c649e409683ea21a3ee2bbd25%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30120: Query syntax error with condition and distinct combination

Django
In reply to this post by Django
#30120: Query syntax error with condition and distinct combination
-------------------------------------+-------------------------------------
     Reporter:  Claude Paroz         |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    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:"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/30120#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/065.e8cf87e4a055e345beaee4b160054008%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30120: Query syntax error with condition and distinct combination

Django
In reply to this post by Django
#30120: Query syntax error with condition and distinct combination
-------------------------------------+-------------------------------------
     Reporter:  Claude Paroz         |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    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/30120#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/065.dc5d109885c574dda01e5a3f34724017%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.