Skip to main content

QueryOutputRewriter

Trait QueryOutputRewriter 

Source
pub trait QueryOutputRewriter: Sync {
    // Required methods
    fn prune_query_outputs(
        &self,
        query: &mut QueryPlan,
        aliases: &[String],
        projection: &SourceProjection,
        schema: &RowSchema,
    );
    fn optimize_retained_query(
        &self,
        query: &QueryPlan,
    ) -> Result<QueryPlan, SQLError>;
    fn push_output_filter(
        &self,
        query: &QueryPlan,
        qualifier: &str,
        filter: &ScalarExpr,
        output_columns: Option<&[String]>,
    ) -> Result<Option<QueryPlan>, SQLError>;
}

Required Methods§

Source

fn prune_query_outputs( &self, query: &mut QueryPlan, aliases: &[String], projection: &SourceProjection, schema: &RowSchema, )

Remove scalar output expressions the containing query does not need, preserving the stored row descriptor and side effects.

Source

fn optimize_retained_query( &self, query: &QueryPlan, ) -> Result<QueryPlan, SQLError>

Optimize a catalog-retained query before assembling either its streaming or materialized execution path.

Source

fn push_output_filter( &self, query: &QueryPlan, qualifier: &str, filter: &ScalarExpr, output_columns: Option<&[String]>, ) -> Result<Option<QueryPlan>, SQLError>

Return a plan that applies the complete output predicate, or None when the caller must retain it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§