Skip to main content

ExpressionConvertor

Trait ExpressionConvertor 

Source
pub trait ExpressionConvertor: Send + Sync {
    // Required methods
    fn can_be_pushed_down(
        &self,
        expr: &Arc<dyn PhysicalExpr>,
        schema: &Schema,
    ) -> bool;
    fn convert(&self, expr: &dyn PhysicalExpr) -> DFResult<Expression>;
    fn split_projection(
        &self,
        source_projection: ProjectionExprs,
        input_schema: &Schema,
        output_schema: &Schema,
    ) -> DFResult<ProcessedProjection>;

    // Provided method
    fn no_pushdown_projection(
        &self,
        source_projection: ProjectionExprs,
        input_schema: &Schema,
    ) -> DFResult<ProcessedProjection> { ... }
}
Expand description

Trait for converting DataFusion expressions to Vortex ones.

Required Methods§

Source

fn can_be_pushed_down( &self, expr: &Arc<dyn PhysicalExpr>, schema: &Schema, ) -> bool

Can an expression be pushed down given a specific schema

Source

fn convert(&self, expr: &dyn PhysicalExpr) -> DFResult<Expression>

Try and convert a DataFusion PhysicalExpr into a Vortex Expression.

Source

fn split_projection( &self, source_projection: ProjectionExprs, input_schema: &Schema, output_schema: &Schema, ) -> DFResult<ProcessedProjection>

Split a projection into Vortex expressions that can be pushed down and leftover DataFusion projections that need to be evaluated after the scan.

Provided Methods§

Source

fn no_pushdown_projection( &self, source_projection: ProjectionExprs, input_schema: &Schema, ) -> DFResult<ProcessedProjection>

Create a projection that reads only the required columns without pushing down any expressions. All projection logic is applied after the scan.

Implementors§