-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Orderings when Offset is used #19031
Comments
This could probably be handled using the #18999. |
When using with Distinct(), this leads to an invalid query.
Translates to this query:
And the following SQL error occures
The problem is with I know, it's a strange combination, but sh!t happens. :) |
Distinct gives you unordered result set, doing Skip/Take on that without order by does not make sense. If we did fix that invalid SQL, it would likely be an error message asking to add OrderBy before Skip/Take. |
Thanks for the reply. |
Order by 1 is ordering by first column in the result. It may work in this query, same may not be true for all the queries. |
When the query contains
Offset
, this code putsORDER BY (SELECT 1)
into the SQL. For the future it would make sense to have this part overridable instead of wholeGenerateOrderings
.The text was updated successfully, but these errors were encountered: