polars_arrow::compute::boolean_kleene

Function and

Source
pub fn and(lhs: &BooleanArray, rhs: &BooleanArray) -> BooleanArray
Available on crate feature compute_boolean_kleene only.
Expand description

Logical ‘and’ operation on two arrays with Kleene logic

§Panics

This function panics iff the arrays have a different length

§Example

use polars_arrow::array::BooleanArray;
use polars_arrow::compute::boolean_kleene::and;

let a = BooleanArray::from(&[Some(true), Some(false), None]);
let b = BooleanArray::from(&[None, None, None]);
let and_ab = and(&a, &b);
assert_eq!(and_ab, BooleanArray::from(&[None, Some(false), None]));