pub fn or_scalar(array: &BooleanArray, scalar: &BooleanScalar) -> BooleanArray
Available on crate feature
compute_boolean
only.Expand description
Performs OR
operation on an array and a scalar value. If either left or right value
is null then the result is also null.
ยงExample
use polars_arrow::array::BooleanArray;
use polars_arrow::compute::boolean::or_scalar;
use polars_arrow::scalar::BooleanScalar;
let array = BooleanArray::from_slice(&[false, false, true, true]);
let scalar = BooleanScalar::new(Some(true));
let result = or_scalar(&array, &scalar);
assert_eq!(result, BooleanArray::from_slice(&[true, true, true, true]));