Skip to content

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

Merged
alamb merged 3 commits intoapache:mainfrom
synnada-ai:bug_fix/empty_rank
Dec 18, 2023
Merged

[minor]: Fix rank calculation bug when empty order by is seen#8567
alamb merged 3 commits intoapache:mainfrom
synnada-ai:bug_fix/empty_rank

Conversation

@mustafasrepo
Copy link
Copy Markdown
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 Changes to the physical-expr crates sqllogictest SQL Logic Tests (.slt) labels Dec 17, 2023
@mustafasrepo
Copy link
Copy Markdown
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
Copy Markdown
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants