pub fn lt_dyn(left: &dyn Array, right: &dyn Array) -> Result<BooleanArray>
Expand description

Perform left < right operation on two (dynamic) Arrays.

Only when two arrays are of the same type the comparison will happen otherwise it will err with a casting error.

Example

use arrow::array::{PrimitiveArray, BooleanArray};
use arrow::datatypes::Int32Type;
use arrow::compute::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);