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]: Fix rank calculation bug when empty order by is seen #8567

Merged
merged 3 commits into from
Dec 18, 2023
Merged

[minor]: Fix rank calculation bug when empty order by is seen #8567

merged 3 commits into from
Dec 18, 2023

Conversation

mustafasrepo
Copy link
Contributor

@mustafasrepo mustafasrepo commented Dec 17, 2023

Which issue does this PR close?

Closes #.

Rationale for this change

Builds on commits in PR8559 (That PR should be merged first). Fixes bug described in discussion.

What changes are included in this PR?

Current rank function produces wrong results when there is no expression in the order by clause. This PR fixes this bug.

Are these changes tested?

Yes

Are there any user-facing changes?

@github-actions github-actions bot added sql SQL Planner physical-expr Physical Expressions sqllogictest SQL Logic Tests (.slt) labels Dec 17, 2023
@mustafasrepo
Copy link
Contributor Author

Thanks @comphead for discovering this bug.

# Conflicts:
#	datafusion/sql/src/expr/function.rs
#	datafusion/sqllogictest/test_files/window.slt
@github-actions github-actions bot removed the sql SQL Planner label Dec 18, 2023
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 @mustafasrepo

@alamb alamb merged commit ceead1c into apache:main Dec 18, 2023
22 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 sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants