Skip to content

[SPARK-46941][SQL][3.5] Can't insert window group limit node for top-k computation if contains SizeBasedWindowFunction #51422

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

Open
wants to merge 1 commit into
base: branch-3.5
Choose a base branch
from

Conversation

zml1206
Copy link
Contributor

@zml1206 zml1206 commented Jul 9, 2025

What changes were proposed in this pull request?

This PR backports #44980 to branch-3.5.
Don't insert window group limit node for top-k computation if contains SizeBasedWindowFunction.

Why are the changes needed?

Bug fix, Insert window group limit node for top-k computation contains SizeBasedWindowFunction will cause wrong result of the SizeBasedWindowFunction`.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

New UT. Before this pr UT will not pass.

Was this patch authored or co-authored using generative AI tooling?

No.

…putation if contains SizeBasedWindowFunction

### What changes were proposed in this pull request?
Don't insert window group limit node for top-k computation if contains `SizeBasedWindowFunction`.

### Why are the changes needed?
Bug fix, Insert window group limit node for top-k computation contains `SizeBasedWindowFunction` will cause wrong result of the SizeBasedWindowFunction`.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
New UT. Before this pr UT will not pass.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#44980 from zml1206/SPARK-46941.

Authored-by: zml1206 <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
@github-actions github-actions bot added the SQL label Jul 9, 2025
@cloud-fan
Copy link
Contributor

Can we copy-paste the full PR description from the original PR and then put This PR backports https://github.com/apache/spark/pull/44980 to branch-3.5. as the first line?

@zml1206
Copy link
Contributor Author

zml1206 commented Jul 9, 2025

Can we copy-paste the full PR description from the original PR and then put This PR backports https://github.com/apache/spark/pull/44980 to branch-3.5. as the first line?

updated

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM.

@dongjoon-hyun
Copy link
Member

cc @peter-toth

@zml1206
Copy link
Contributor Author

zml1206 commented Jul 15, 2025

@cloud-fan @dongjoon-hyun CI failures appear unrelated, if you have no other comments, could you please merge it? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants