vortex_expr

Function gt_eq

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

Create a new BinaryExpr using the Gte operator.

ยงExample usage

use vortex_array::array::{BoolArray, PrimitiveArray };
use vortex_array::{IntoArrayData, IntoArrayVariant};
use vortex_array::validity::Validity;
use vortex_buffer::buffer;
use vortex_expr::{gt_eq, ident, lit};

let xs = PrimitiveArray::new(buffer![1i32, 2i32, 3i32], Validity::NonNullable).into_array();
let result = gt_eq(ident(), lit(3)).evaluate(&xs).unwrap();

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