Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #33768 -- Fixed ordering compound queries by nulls_first/nulls_last on MySQL. #16150

Merged
merged 1 commit into from Oct 5, 2022

Conversation

felixxm
Copy link
Member

@felixxm felixxm commented Oct 5, 2022

Columns of the left outer most select statement in a combined query can be referenced by alias just like by index.

This removes combined query ordering by column index and avoids an unnecessary usage of RawSQL which causes issues for backends that specialize the treatment of null ordering.

ticket-33768

@felixxm
Copy link
Member Author

felixxm commented Oct 5, 2022

@apollo13 Does it work for you?

@apollo13
Copy link
Member

apollo13 commented Oct 5, 2022

@felixxm to what extend? #15831 is what fixes postgresql stuff for me.

@felixxm
Copy link
Member Author

felixxm commented Oct 5, 2022

@felixxm to what extend? #15831 is what fixes postgresql stuff for me.

As a proper fix for ticket-33768, which you reported 😄

@apollo13
Copy link
Member

apollo13 commented Oct 5, 2022

Oh yes, if you copied the test then it works for me :D

…last on MySQL.

Columns of the left outer most select statement in a combined query
can be referenced by alias just like by index.

This removes combined query ordering by column index and avoids an
unnecessary usage of RawSQL which causes issues for backends that
specialize the treatment of null ordering.
@felixxm felixxm merged commit c58a8ac into django:main Oct 5, 2022
@felixxm felixxm deleted the issue-33768 branch October 5, 2022 12:30
@felixxm felixxm temporarily deployed to schedules October 6, 2022 03:18 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants