Function and

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

Create a new BinaryExpr using the And operator.

ยงExample usage

use vortex_array::arrays::BoolArray;
use vortex_array::{IntoArray, ToCanonical};
use vortex_expr::{and, ident, lit};

let xs = BoolArray::from_iter(vec![true, false, true]);
let result = and(ident(), lit(true)).evaluate(&xs).unwrap();

assert_eq!(
    result.to_bool().unwrap().boolean_buffer(),
    BoolArray::from_iter(vec![true, false, true]).boolean_buffer(),
);