#30209: Union with group by don't generate correct Subquery
-------------------------------------+-------------------------------------
     Reporter:  Nikolas              |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  union, group by      |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by TKdka):

 Replying to [comment:2 Simon Charette]:
 > I agree that either an exception should be raised and the
 [https://docs.djangoproject.com/en/2.1/ref/models/querysets/#union
 documentation be adjusted] to explicitly mention aggregation won't work or
 adding an aggregate function should perform a subquery pushdown.

 I'm planning to make this a sub query pushdown as suggested.  FYI, this is
 my first contribution to the code base, so suggestions and feedback would
 be most appreciated.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30209#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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.e98fa7cc29985a178f02b161a64157c6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to