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

Bug-fix / Limit with_new_exprs() #13109

Merged
merged 3 commits into from
Oct 25, 2024
Merged

Conversation

berkaysynnada
Copy link
Contributor

@berkaysynnada berkaysynnada commented Oct 25, 2024

Which issue does this PR close?

Closes #.

Rationale for this change

https://github.com/apache/datafusion/pull/13028/files#diff-f69e720234d9da6cb3a4a178d3a5575fcd34f68191335a8c2465a172e8c4e6f1 introduced a minor bug. When there is a fetch but no skip in limit, its rewrite would discard that fetch.

What changes are included in this PR?

Rather than using eager relation op and(), lazy and_then()'s should be used to avoid popping expr when skip is None but fetch is Some(), as expr need to be popped to fetch.

Are these changes tested?

Yes, a unit test is added

Are there any user-facing changes?

@github-actions github-actions bot added the logical-expr Logical plan and expressions label Oct 25, 2024
Copy link
Member

@jonahgao jonahgao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @berkaysynnada for the fix ❤️

@jonahgao jonahgao merged commit 06594c7 into apache:main Oct 25, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logical-expr Logical plan and expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants