Changes between Version 2 and Version 3 of Ticket #35011, comment 1


Ignore:
Timestamp:
Dec 4, 2023, 9:17:32 PM (12 months ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35011, comment 1

    v2 v3  
    99The fundamental issue here is that the order of specified fields in `values` has never been a 1:1 match to the order of the `SELECT` columns but the latter is a necessity to do proper `UNION` between querysets.
    1010
    11 The order is, and has always been, `SELECT *extra, *fields, *annotations` and within each groups the order of `values` is respected since #28553 which landed in d6b6e5d0fd4e6b6d0183b4cf6e4bd4f9afc7bf67 so I guess this is what broke things on your side during the attempted upgrade but that your tests failed to capture. In this sense I guess this could be considered a release blocker as it changed the ordering from an ambiguous ordering to the other.
     11[https://github.com/django/django/blob/14884b6be89963c8ceb2c9da459ed8421aea3bf8/django/db/models/sql/compiler.py#L251-L276 The order is, and has always been], `SELECT *extra, *fields, *annotations` and within each groups the order of `values` is respected since #28553 which landed in d6b6e5d0fd4e6b6d0183b4cf6e4bd4f9afc7bf67 so I guess this is what broke things on your side during the attempted upgrade but that your tests failed to capture. In this sense I guess this could be considered a release blocker as it changed the ordering from an ambiguous ordering to the other.
    1212
    1313I tried [https://github.com/django/django/pull/16703 solving the fundamental issue] but I got in a rabbit hole with regards to the deprecation of `extra(fields)` which [https://github.com/django/django/pull/16681 I tried to focus on first]. I'd like to find time to get this across the finish line during the holidays so I'll assign to me in the mean time.
Back to Top