#32478: Queryset annotation mixing aggregate and subquery doesn't GROUP BY outer
column references.
-------------------------------------+-------------------------------------
     Reporter:  Igor Pejic           |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  outerref, subquery   |             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


Comment:

 Igor, could you confirm your issue is resolved by
 https://github.com/django/django/pull/14039.

 The underlying problem was that nested external column references were not
 recursively collected so the problem detailed in #31094 could manifest
 itself when mixing aggregation with a nested subqueries because
 `Query.get_external_cols()` would not account for possibly nested
 subqueries with external column references.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32478#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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.9307fae2c0f578699afde56f96ad9e51%40djangoproject.com.

Reply via email to