Skip to content

Add RunEndEncoded array comparator#9368

Open
codephage2020 wants to merge 3 commits intoapache:mainfrom
codephage2020:issue-9360
Open

Add RunEndEncoded array comparator#9368
codephage2020 wants to merge 3 commits intoapache:mainfrom
codephage2020:issue-9360

Conversation

@codephage2020
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are these changes tested?

YES

Are there any user-facing changes?

make_comparator now accepts RunEndEncoded arrays

Implement compare_run_end_encoded to support RunEndEncoded arrays by mapping logical indices to physical indices via run_ends and delegating to the child-value comparator.
@github-actions github-actions bot added the arrow Changes to the arrow crate label Feb 6, 2026
@codephage2020 codephage2020 marked this pull request as ready for review February 6, 2026 06:05
@codephage2020
Copy link
Contributor Author

@Jefffrey Feel free to give me some advice when you have time.

right: &dyn Array,
opts: SortOptions,
) -> Result<DynComparator, ArrowError> {
let left = left.as_any().downcast_ref::<RunArray<R>>().unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can use as_run here

@codephage2020
Copy link
Contributor Author

Thanks for the review @Jefffrey! All three suggestions have been addressed.

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.

Support RunEndEncoded in ord comparator

2 participants