viirya commented on code in PR #3730:
URL: https://github.com/apache/arrow-rs/pull/3730#discussion_r1113539786
##########
arrow-ord/src/comparison.rs:
##########
@@ -4006,6 +4107,124 @@ mod tests {
);
}
+ fn test_primitive_dyn_scalar<T: ArrowPrimitiveType>(array:
PrimitiveArray<T>) {
+ let a_eq = eq_dyn_scalar(&array, 8).unwrap();
+ assert_eq!(
+ a_eq,
+ BooleanArray::from(vec![Some(false), None, Some(true), None,
Some(false)])
+ );
+
+ let a_eq = gt_eq_dyn_scalar(&array, 8).unwrap();
+ assert_eq!(
+ a_eq,
+ BooleanArray::from(vec![Some(false), None, Some(true), None,
Some(true)])
+ );
+
+ let a_eq = gt_dyn_scalar(&array, 8).unwrap();
+ assert_eq!(
+ a_eq,
+ BooleanArray::from(vec![Some(false), None, Some(false), None,
Some(true)])
+ );
+
+ let a_eq = lt_eq_dyn_scalar(&array, 8).unwrap();
+ assert_eq!(
+ a_eq,
+ BooleanArray::from(vec![Some(true), None, Some(true), None,
Some(false)])
+ );
+
+ let a_eq = lt_dyn_scalar(&array, 8).unwrap();
+ assert_eq!(
+ a_eq,
+ BooleanArray::from(vec![Some(true), None, Some(false), None,
Some(false)])
+ );
+ }
+
+ #[test]
Review Comment:
Added some tests to prevent regression in later change.
--
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]