Skip to main content

or

Function or 

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

Create a new Binary using the Or operator.

ยงExample usage

let xs = BoolArray::from_iter(vec![true, false, true]);
let result = xs.into_array().apply(&or(root(), lit(false))).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(),
);