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

Fix primitive sort when input contains more nulls than the given sort limit #954

Merged
merged 1 commit into from
Nov 18, 2021

Conversation

jhorstmann
Copy link
Contributor

Which issue does this PR close?

Closes #953.

Rationale for this change

This fixes the calculation for the number of elements that need to be sorted by sort_unstable_by

@github-actions github-actions bot added the arrow Changes to the arrow crate label Nov 17, 2021
Copy link

@andreluecke-signavio andreluecke-signavio left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Nulls strike again. Nice find @jhorstmann

I did some archeology, and I think this defect has existed since the introduction of sort with limit in 08b0270

cc @sundy-li in case you are interested

nulls_first: false,
}),
Some(2),
vec![4, 6],
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@alamb alamb merged commit 02f3ec8 into apache:master Nov 18, 2021
alamb added a commit that referenced this pull request Nov 22, 2021
… limit (#954) (#965)

Co-authored-by: Jörn Horstmann <git@jhorstmann.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect sort result with primitive array that contain more nulls than the sort limit
3 participants