alamb commented on a change in pull request #317:
URL: https://github.com/apache/arrow-rs/pull/317#discussion_r641924693



##########
File path: arrow/src/compute/kernels/arithmetic.rs
##########
@@ -835,6 +1242,18 @@ mod tests {
         assert_eq!(9, c.value(4));
     }
 
+    #[test]
+    fn test_primitive_array_modulus() {
+        let a = Int32Array::from(vec![15, 15, 8, 1, 9]);
+        let b = Int32Array::from(vec![5, 6, 8, 9, 1]);
+        let c = modulus(&a, &b).unwrap();
+        assert_eq!(0, c.value(0));

Review comment:
       It is possible to compare the `c` in fewer lines using something like 
`assert_eq!(c, Int32Array:from(vec![3. 0, 2, 3, 4])`, which also has the 
advantage if ensuring that `c.len() == 5`. This way is fine too

##########
File path: arrow/src/compute/kernels/arithmetic.rs
##########
@@ -875,6 +1321,19 @@ mod tests {
         assert_eq!(true, c.is_null(5));
     }
 
+    #[test]
+    fn test_primitive_array_modulus_with_nulls() {

Review comment:
       🤗 👍 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to