vortex_expr

Trait VortexExpr

Source
pub trait VortexExpr:
    Debug
    + Send
    + Sync
    + DynEq
    + DynHash
    + Display {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn unchecked_evaluate(&self, batch: &ArrayData) -> VortexResult<ArrayData>;
    fn children(&self) -> Vec<&ExprRef>;
    fn replacing_children(self: Arc<Self>, children: Vec<ExprRef>) -> ExprRef;

    // Provided methods
    fn evaluate(&self, batch: &ArrayData) -> VortexResult<ArrayData> { ... }
    fn return_dtype(&self, scope_dtype: &DType) -> VortexResult<DType> { ... }
}
Expand description

Represents logical operation on ArrayDatas

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Convert expression reference to reference of Any type

Source

fn unchecked_evaluate(&self, batch: &ArrayData) -> VortexResult<ArrayData>

Compute result of expression on given batch producing a new batch

“Unchecked” means that this function lacks a debug assertion that the returned array matches the VortexExpr::return_dtype method. Use instead the VortexExpr::evaluate function which includes such an assertion.

Source

fn children(&self) -> Vec<&ExprRef>

Source

fn replacing_children(self: Arc<Self>, children: Vec<ExprRef>) -> ExprRef

Provided Methods§

Source

fn evaluate(&self, batch: &ArrayData) -> VortexResult<ArrayData>

Compute result of expression on given batch producing a new batch

Source

fn return_dtype(&self, scope_dtype: &DType) -> VortexResult<DType>

Compute the type of the array returned by VortexExpr::evaluate.

Trait Implementations§

Source§

impl<'hash> Hash for dyn VortexExpr + 'hash

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl<'hash> Hash for dyn VortexExpr + Send + 'hash

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl<'hash> Hash for dyn VortexExpr + Send + Sync + 'hash

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl<'hash> Hash for dyn VortexExpr + Sync + 'hash

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl PartialEq for dyn VortexExpr

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for dyn VortexExpr

Implementors§