Skip to main content

and

Function and 

Source
pub fn and(lhs: Expression, rhs: Expression) -> Expression
Expand description

Create a new Binary using the And operator.

ยงExample usage

let xs = BoolArray::from_iter(vec![true, false, true]).into_array();
let result = xs.apply(&and(root(), lit(true))).unwrap();
let mut ctx = array_session().create_execution_ctx();

assert_eq!(
    result.execute::<BoolArray>(&mut ctx).unwrap().to_bit_buffer(),
    BoolArray::from_iter(vec![true, false, true]).to_bit_buffer(),
);