Function polars_arrow::compute::boolean_kleene::or_scalar
source · pub fn or_scalar(array: &BooleanArray, scalar: &BooleanScalar) -> BooleanArray
Available on crate feature
compute_boolean_kleene
only.Expand description
Logical ‘or’ operation on an array and a scalar value with Kleene logic
§Example
use polars_arrow::array::BooleanArray;
use polars_arrow::scalar::BooleanScalar;
use polars_arrow::compute::boolean_kleene::or_scalar;
let array = BooleanArray::from(&[Some(true), Some(false), None]);
let scalar = BooleanScalar::new(Some(false));
let result = or_scalar(&array, &scalar);
assert_eq!(result, BooleanArray::from(&[Some(true), Some(false), None]));