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

Minor: Avoid emitting empty batches in partial sort #13895

Merged
merged 3 commits into from
Dec 25, 2024

Conversation

berkaysynnada
Copy link
Contributor

@berkaysynnada berkaysynnada commented Dec 24, 2024

Which issue does this PR close?

Closes #.

Rationale for this change

PartialSort could still generate empty batches after the exhaustion of its input. That is avoided, and debug_assert!() is moved to the actual return point.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the physical-expr Physical Expressions label Dec 24, 2024
Copy link
Contributor

@ozankabak ozankabak left a comment

Choose a reason for hiding this comment

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

LGTM

@alamb
Copy link
Contributor

alamb commented Dec 24, 2024

FYI @comphead and @korowa

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @berkaysynnada from what i remember we got multiple of such paths where empty batch returned and remaining part of plan executed for nothing

@berkaysynnada
Copy link
Contributor Author

lgtm thanks @berkaysynnada from what i remember we got multiple of such paths where empty batch returned and remaining part of plan executed for nothing

We need to avoid all those paths

@ozankabak
Copy link
Contributor

This is already reviewed by 3 people and is a fairly easy change, so I will go ahead and merge it

@ozankabak ozankabak merged commit 7b4e559 into apache:main Dec 25, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physical-expr Physical Expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants