Trait VortexExpr

Source
pub trait VortexExpr:
    'static
    + Send
    + Sync
    + Debug
    + Display
    + DynEq
    + DynHash
    + Sealed
    + AnalysisExpr {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn to_expr(&self) -> ExprRef;
    fn encoding(&self) -> ExprEncodingRef;
    fn unchecked_evaluate(&self, ctx: &Scope) -> VortexResult<ArrayRef>;
    fn children(&self) -> Vec<&ExprRef> ;
    fn with_children(
        self: Arc<Self>,
        children: Vec<ExprRef>,
    ) -> VortexResult<ExprRef>;
    fn return_dtype(&self, scope: &DType) -> VortexResult<DType>;

    // Provided method
    fn metadata(&self) -> Option<Vec<u8>> { ... }
}
Expand description

Represents logical operation on ArrayRefs

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Convert expression reference to reference of Any type

Source

fn to_expr(&self) -> ExprRef

Convert the expression to an ExprRef.

Source

fn encoding(&self) -> ExprEncodingRef

Return the encoding of the expression.

Source

fn unchecked_evaluate(&self, ctx: &Scope) -> VortexResult<ArrayRef>

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>

Returns the children of this expression.

Source

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

Returns a new instance of this expression with the children replaced.

Source

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

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

Provided Methods§

Source

fn metadata(&self) -> Option<Vec<u8>>

Serialize the metadata of this expression into a bytes vector.

Returns None if the expression does not support serialization.

Implementations§

Source§

impl dyn VortexExpr + '_

Source

pub fn id(&self) -> ExprId

Source

pub fn is<V: VTable>(&self) -> bool

Source

pub fn as_<V: VTable>(&self) -> &V::Expr

Source

pub fn as_opt<V: VTable>(&self) -> Option<&V::Expr>

Source

pub fn evaluate(&self, scope: &Scope) -> VortexResult<ArrayRef>

Compute result of expression on given batch producing a new batch

Trait Implementations§

Source§

impl AsRef<dyn VortexExpr> for BetweenExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for BinaryExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for CastExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for DynamicComparisonExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for GetItemExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for IsNullExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for LikeExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for ListContainsExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for LiteralExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for MergeExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for NotExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for PackExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for RootExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn VortexExpr> for SelectExpr

Source§

fn as_ref(&self) -> &dyn VortexExpr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl ExprSerializeProtoExt for dyn VortexExpr + '_

Source§

fn serialize_proto(&self) -> VortexResult<Expr>

Serialize the expression to its protobuf representation.
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§