tustvold commented on code in PR #2365:
URL: https://github.com/apache/arrow-rs/pull/2365#discussion_r944224937


##########
arrow/src/compute/kernels/comparison.rs:
##########
@@ -2197,6 +2248,76 @@ where
     compare_dict_op!(left, right, op, PrimitiveArray<T>)
 }
 
+// Compares two dictionary using bit-equality (helps reduce how much code is 
instantiated as
+// types with the same underlying native type can share the instantiated code).
+fn cmp_dict_bit_equal<K, T, F>(
+    left: &DictionaryArray<K>,
+    right: &DictionaryArray<K>,
+    op: F,
+) -> Result<BooleanArray>
+where
+    K: ArrowNumericType,
+    T: ArrowNumericType,
+    T::Native: CmpRepr,
+    F: Fn(<T::Native as CmpRepr>::Repr, <T::Native as CmpRepr>::Repr) -> bool,
+{
+    compare_dict_op!(
+        left,
+        right,
+        op,
+        PrimitiveArray<T>,
+        <T::Native as CmpRepr>::Repr
+    )
+}
+
+// Trait to help reduce the number of function instantiations by merging types 
which compare the
+// same (u8/i8 are compared the same way)

Review Comment:
   I'm not sure this is correct, as u8 is an unsigned comparison whereas i8 is 
signed?



-- 
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]

Reply via email to