RTEnzyme opened a new issue, #6066:
URL: https://github.com/apache/arrow-datafusion/issues/6066

   ### Is your feature request related to a problem or challenge?
   
   Currently, binary bitwise array operations are being reimplemented using a 
loop in 
repositoryhttps://github.com/apache/arrow-datafusion/blob/main/datafusion/physical-expr/src/expressions/binary/kernels.rs#L30):
   ```rust
   /// The binary_bitwise_array_op macro only evaluates for integer types
   /// like int64, int32.
   /// It is used to do bitwise operation.
   macro_rules! binary_bitwise_array_op {
       ($LEFT:expr, $RIGHT:expr, $METHOD:expr, $ARRAY_TYPE:ident) => {{
           let len = $LEFT.len();
           let left = $LEFT.as_any().downcast_ref::<$ARRAY_TYPE>().unwrap();
           let right = $RIGHT.as_any().downcast_ref::<$ARRAY_TYPE>().unwrap();
           let result = (0..len)
               .into_iter()
               .map(|i| {
                   if left.is_null(i) || right.is_null(i) {
                       None
                   } else {
                       Some($METHOD(left.value(i), right.value(i)))
                   }
               })
               .collect::<$ARRAY_TYPE>();
           Ok(Arc::new(result))
       }};
   }
   ```
   
   I think arrow-rs bitwise 
operation(https://github.com/apache/arrow-rs/blob/master/arrow-arith/src/bitwise.rs#L24)
 can be used to achieve better performance.
   
   ### Describe the solution you'd like
   
   Use arrow-arith bitwise 
opeartion(https://github.com/apache/arrow-rs/blob/master/arrow-arith/src/bitwise.rs#L24)
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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