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§
Sourcefn can_be_pushed_down(
&self,
expr: &Arc<dyn PhysicalExpr>,
schema: &Schema,
) -> bool
fn can_be_pushed_down( &self, expr: &Arc<dyn PhysicalExpr>, schema: &Schema, ) -> bool
Can an expression be pushed down given a specific schema
Sourcefn convert(&self, expr: &dyn PhysicalExpr) -> DFResult<Expression>
fn convert(&self, expr: &dyn PhysicalExpr) -> DFResult<Expression>
Try and convert a DataFusion PhysicalExpr into a Vortex Expression.
Sourcefn split_projection(
&self,
source_projection: ProjectionExprs,
input_schema: &Schema,
output_schema: &Schema,
) -> DFResult<ProcessedProjection>
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§
Sourcefn no_pushdown_projection(
&self,
source_projection: ProjectionExprs,
input_schema: &Schema,
) -> DFResult<ProcessedProjection>
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.