Support nested REE in arrow-ord partition function#9642
Open
liamzwbao wants to merge 1 commit intoapache:mainfrom
Open
Support nested REE in arrow-ord partition function#9642liamzwbao wants to merge 1 commit intoapache:mainfrom
liamzwbao wants to merge 1 commit intoapache:mainfrom
Conversation
alamb
approved these changes
Apr 1, 2026
Contributor
alamb
left a comment
There was a problem hiding this comment.
Looks good to me -- thank you @liamzwbao
I think it would be nice to move supports_distinct but we can do that as a follow on if you prefer
| /// `compare_op` unwraps at most one level of dictionary, then dispatches on | ||
| /// the leaf type. Anything else (REE, nested dictionary, nested/complex types) | ||
| /// must go through `make_comparator` instead. | ||
| fn supports_distinct(dt: &DataType) -> bool { |
Contributor
There was a problem hiding this comment.
this is a nice minimal code change 👍
| Ok(Partitions(Some(acc))) | ||
| } | ||
|
|
||
| /// Returns true if `distinct` (via `compare_op`) can handle this data type. |
Contributor
There was a problem hiding this comment.
I think this would make more sense to put next to distinct rather than in this module
So that owuld mean moving to arrow-ord/src/cmp.rs I think (and making it pub crate)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
partitionfunction #9640.Rationale for this change
Although rare, it's totally valid to have nested REE and dict encoding and we should handle it correctly.
What changes are included in this PR?
Process nested REE, nested dict, dict of REE, REE of dict gracefully
Are these changes tested?
Yes
Are there any user-facing changes?