pub fn lt_eq_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::Date32Type;
use arrow::compute::lt_eq_dyn;
let array1: PrimitiveArray<Date32Type> = vec![Some(12356), Some(13548), Some(-365), Some(365)].into();
let array2: PrimitiveArray<Date32Type> = vec![Some(12355), Some(13548), Some(-364), None].into();
let result = lt_eq_dyn(&array1, &array2).unwrap();
assert_eq!(BooleanArray::from(vec![Some(false), Some(true), Some(true), None]), result);