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

Query: remove redundant WHERE 0 > x.row from APPLY converted to ROW_NUMBER #21290

Closed
maumar opened this issue Jun 16, 2020 · 1 comment
Closed
Labels
area-query closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. type-cleanup

Comments

@maumar
Copy link
Contributor

maumar commented Jun 16, 2020

When translating split queries where subquery has order by, we add Skip(0) so that Sql server won't complain. Later we convert some of those queries to ROW_NUMBER using the take/skip value as a filter on the generated row numbers. We should recognize skip(0) and avoid the unnecessary predicate

@maumar maumar added customer-reported area-query type-cleanup good first issue This issue should be relatively straightforward to fix. and removed customer-reported labels Jun 16, 2020
@maumar maumar removed the good first issue This issue should be relatively straightforward to fix. label Jun 16, 2020
@maumar
Copy link
Contributor Author

maumar commented Jun 16, 2020

turns out (as it's usually the case in query pipeline) its not that simple - closing

@maumar maumar closed this as completed Jun 16, 2020
@smitpatel smitpatel added the closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. label Jul 28, 2020
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. type-cleanup
Projects
None yet
Development

No branches or pull requests

3 participants