HaoYang670 commented on code in PR #2756:
URL: https://github.com/apache/arrow-rs/pull/2756#discussion_r977624743


##########
arrow/src/compute/kernels/arithmetic.rs:
##########
@@ -1075,18 +1075,18 @@ pub fn modulus<T>(
 ) -> Result<PrimitiveArray<T>>
 where
     T: ArrowNumericType,
-    T::Native: Rem<Output = T::Native> + Zero + One,
+    T::Native: ArrowNativeTypeOp + One,
 {
     #[cfg(feature = "simd")]
     return simd_checked_divide_op(&left, &right, simd_checked_modulus::<T>, 
|a, b| {
-        a % b
+        a.mod_wrapping(b)
     });

Review Comment:
   > I don't think we should change only scalar op.
   
   Thank you for explanation. This makes sense. I will update the code and add 
tests to freeze the behaviour.



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to