Skip to content

fix: check upfront if sorting empty array or 0 limit#10293

Open
Jefffrey wants to merge 1 commit into
apache:mainfrom
Jefffrey:sort_empty_runs
Open

fix: check upfront if sorting empty array or 0 limit#10293
Jefffrey wants to merge 1 commit into
apache:mainfrom
Jefffrey:sort_empty_runs

Conversation

@Jefffrey

@Jefffrey Jefffrey commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

See issue.

What changes are included in this PR?

Check upfront for our public sort methods if we're sorting an empty array or sorting with 0 limit, to immediately return an empty array.

Are these changes tested?

Added tests.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the arrow Changes to the arrow crate label Jul 6, 2026

@Rich-T-kid Rich-T-kid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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.

Unsound sort_run_downcasted constructs invalid RunArray on empty array or zero limit

2 participants