pub fn lt_dyn(
left: &dyn Array,
right: &dyn Array,
) -> Result<BooleanArray, ArrowError>
👎Deprecated: Use arrow_ord::cmp::lt
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::{PrimitiveArray, BooleanArray};
use arrow_array::types::Int32Type;
use arrow_ord::comparison::lt_dyn;
let array1: PrimitiveArray<Int32Type> = PrimitiveArray::from(vec![Some(0), Some(1), Some(2)]);
let array2: PrimitiveArray<Int32Type> = PrimitiveArray::from(vec![Some(1), Some(1), None]);
let result = lt_dyn(&array1, &array2).unwrap();
assert_eq!(BooleanArray::from(vec![Some(true), Some(false), None]), result);