alamb commented on code in PR #9642:
URL: https://github.com/apache/arrow-rs/pull/9642#discussion_r3024661148
##########
arrow-ord/src/partition.rs:
##########
@@ -152,13 +152,30 @@ pub fn partition(columns: &[ArrayRef]) ->
Result<Partitions, ArrowError> {
Ok(Partitions(Some(acc)))
}
+/// Returns true if `distinct` (via `compare_op`) can handle this data type.
Review 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)
##########
arrow-ord/src/partition.rs:
##########
@@ -152,13 +152,30 @@ pub fn partition(columns: &[ArrayRef]) ->
Result<Partitions, ArrowError> {
Ok(Partitions(Some(acc)))
}
+/// Returns true if `distinct` (via `compare_op`) can handle this data type.
+///
+/// `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 {
Review Comment:
this is a nice minimal code change 👍
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]