Rich-T-kid commented on code in PR #11407:
URL: https://github.com/apache/arrow-rs/pull/11407#discussion_r4275302101
##########
arrow-cmp/src/lib.rs:
##########
@@ -220,6 +220,25 @@ fn compare_dict<K: ArrowDictionaryKeyType>(
) -> Result<DynComparator, ArrowError> {
let left = left.as_dictionary::<K>();
let right = right.as_dictionary::<K>();
+ let value_dtype = left.values().data_type();
+ if value_dtype == right.values().data_type() {
+ match value_dtype {
+ DataType::Utf8 => return Ok(compare_dict_bytes::<K,
Utf8Type>(left, right, opts)),
+ DataType::LargeUtf8 => {
+ return Ok(compare_dict_bytes::<K, LargeUtf8Type>(left, right,
opts));
+ }
+ DataType::Binary => {
+ return Ok(compare_dict_bytes::<K, BinaryType>(left, right,
opts));
+ }
+ DataType::LargeBinary => {
+ return Ok(compare_dict_bytes::<K, LargeBinaryType>(left,
right, opts));
+ }
Review Comment:
I choose to not include these because they all call the same underlying
function so nothing different should be happening. I don't mind using this
approach though, seems like a neat idea actually 👍
--
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]