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 #26192 -- Added control that removing constants from ordering. #11384

Closed
wants to merge 1 commit into from

Conversation

cansarigol
Copy link
Contributor

@cansarigol cansarigol commented May 18, 2019

Ticket: #26192

@cansarigol
Copy link
Contributor Author

cansarigol commented May 18, 2019

Hi @felixxm, I changed the pr as you want. Could you review it?
in addition, I added a warning. if it's unnecessary, I'll delete that part.

@cansarigol
Copy link
Contributor Author

test errors about: annotation=Value(1, IntegerField()) and order by annotation
If there will be a warning, this line must be deleted.

# Should not raise
 list(qs1.union(qs2).order_by('annotation'))

@felixxm
Copy link
Member

felixxm commented May 21, 2019

Falling test proved that ordering by constants is reasonable in some cases (e.g. in compound queries). I prepared PR #11396 with alternative approach.

@cansarigol cansarigol closed this May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants