pub fn gt_dyn(
left: &dyn Array,
right: &dyn Array,
) -> Result<BooleanArray, ArrowError>
👎Deprecated: Use arrow_ord::cmp::gt
Expand description
Perform left > right
operation on two (dynamic) Array
s.
Only when two arrays are of the same type the comparison will happen otherwise it will err with a casting error.
For floating values like f32 and f64, this comparison produces an ordering in accordance to
the totalOrder predicate as defined in the IEEE 754 (2008 revision) floating point standard.
Note that totalOrder treats positive and negative zeros are different. If it is necessary
to treat them as equal, please normalize zeros before calling this kernel.
Please refer to f32::total_cmp
and f64::total_cmp
.
§Example
use arrow_array::BooleanArray;
use arrow_ord::comparison::gt_dyn;
let array1 = BooleanArray::from(vec![Some(true), Some(false), None]);
let array2 = BooleanArray::from(vec![Some(false), Some(true), None]);
let result = gt_dyn(&array1, &array2).unwrap();
assert_eq!(BooleanArray::from(vec![Some(true), Some(false), None]), result);