Function polars_arrow::compute::boolean::or
source · pub fn or(lhs: &BooleanArray, rhs: &BooleanArray) -> BooleanArray
Available on crate feature
compute_boolean
only.Expand description
Performs ||
operation on two BooleanArray
, combining the validities.
§Panics
This function panics iff the arrays have different lengths.
§Examples
use polars_arrow::array::BooleanArray;
use polars_arrow::compute::boolean::or;
let a = BooleanArray::from(vec![Some(false), Some(true), None]);
let b = BooleanArray::from(vec![Some(true), Some(true), Some(false)]);
let or_ab = or(&a, &b);
assert_eq!(or_ab, BooleanArray::from(vec![Some(true), Some(true), None]));