viirya commented on code in PR #2740:
URL: https://github.com/apache/arrow-rs/pull/2740#discussion_r973605260


##########
arrow/src/compute/kernels/arithmetic.rs:
##########
@@ -522,67 +542,78 @@ macro_rules! typed_dict_math_op {
     }};
 }
 
-/// Helper function to perform math lambda function on values from two 
dictionary arrays, this
-/// version does not attempt to use SIMD explicitly (though the compiler may 
auto vectorize)
-macro_rules! math_dict_op {
-    ($left: expr, $right:expr, $op:expr, $value_ty:ty) => {{
-        if $left.len() != $right.len() {
-            return Err(ArrowError::ComputeError(format!(
-                "Cannot perform operation on arrays of different length ({}, 
{})",
-                $left.len(),
-                $right.len()
-            )));
-        }
+/// Perform given operation on two `DictionaryArray`s.
+/// Returns an error if the two arrays have different value type

Review Comment:
   Hm, `math_op_dict`? The change just inlines macro `math_dict_op` into the 
function `math_op_dict`. So I suppose you are not meaning the change but 
`math_op_dict` itself?
   
   This can be done in follow-up to optimize it. The current change diff is 
quite big.



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