#31568: Alias used in aggregate filtering is incorrect.
-------------------------------------+-------------------------------------
     Reporter:  Gagaro               |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

 In [changeset:"49bbf6570d9f0880b836f741d79e4cdb6e061ea2" 49bbf657]:
 {{{
 #!CommitTicketReference repository=""
 revision="49bbf6570d9f0880b836f741d79e4cdb6e061ea2"
 [3.0.x] Fixed #31568 -- Fixed alias reference when aggregating over
 multiple subqueries.

 691def10a0197d83d2d108bd9043b0916d0f09b4 made all Subquery() instances
 equal to each other which broke aggregation subquery pushdown which
 relied on object equality to determine which alias it should select.

 Subquery.__eq__() will be fixed in an another commit but
 Query.rewrite_cols() should haved used object identity from the start.

 Refs #30727, #30188.

 Thanks Makina Corpus for the report.

 Backport of adfbf653dc1c1d0e0dacc4ed46602d22ba28b004 from master
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31568#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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.c511bf781797cf08c9a74c5904aa5ad2%40djangoproject.com.

Reply via email to