#31377: Django 3.0: "GROUP BY" clauses error with tricky field annotation
-------------------------------------+-------------------------------------
     Reporter:  Holovashchenko       |                    Owner:  Hasan
  Vadym                              |  Ramezani
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:  group by, postgres,  |             Triage Stage:  Ready for
  annotate                           |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

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

 In [changeset:"dd68af62b2b27ece50d434f6a351877212e15c3f" dd68af62]:
 {{{
 #!CommitTicketReference repository=""
 revision="dd68af62b2b27ece50d434f6a351877212e15c3f"
 Fixed #34176 -- Fixed grouping by ambiguous aliases.

 Regression in b7b28c7c189615543218e81319473888bc46d831.

 Refs #31377.

 Thanks Shai Berger for the report and reviews.

 test_aggregation_subquery_annotation_values_collision() has been
 updated as queries that are explicitly grouped by a subquery should
 always be grouped by it and not its outer columns even if its alias
 collides with referenced table columns. This was not possible to
 accomplish at the time 10866a10 landed because we didn't have compiler
 level handling of colliding aliases.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31377#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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070185964a37c3-89fe2557-7046-4968-9f69-f4cff2c5b6d7-000000%40eu-central-1.amazonses.com.

Reply via email to