pub trait QueryOutputRewriter: Sync {
// Required methods
fn optimize_retained_query(
&self,
query: MutableQueryPlan,
control: &ProductionControl<'_>,
) -> Result<OwnedQueryPlan, SQLError>;
fn prune_owned_query_outputs(
&self,
query: MutableQueryPlan,
aliases: &[String],
projection: &SourceProjection,
schema: &RowSchema,
visible_ctes: &dyn Fn(&str) -> bool,
control: &ProductionControl<'_>,
) -> Result<MutableQueryPlan, SQLError>;
fn push_output_filter(
&self,
query: &QueryPlan,
qualifier: &str,
filter: &ScalarExpr,
output_columns: Option<&[String]>,
) -> Result<Option<OwnedQueryPlan>, SQLError>;
// Provided method
fn push_derived_output_filter(
&self,
query: &QueryPlan,
qualifier: &str,
filter: &ScalarExpr,
output_columns: Option<&[String]>,
) -> Result<Option<OwnedQueryPlan>, SQLError> { ... }
}Required Methods§
Sourcefn optimize_retained_query(
&self,
query: MutableQueryPlan,
control: &ProductionControl<'_>,
) -> Result<OwnedQueryPlan, SQLError>
fn optimize_retained_query( &self, query: MutableQueryPlan, control: &ProductionControl<'_>, ) -> Result<OwnedQueryPlan, SQLError>
Consume the private catalog-query destination before assembling its streaming or materialized execution path. The caller has already restored layouts and applied its output demand.
fn prune_owned_query_outputs( &self, query: MutableQueryPlan, aliases: &[String], projection: &SourceProjection, schema: &RowSchema, visible_ctes: &dyn Fn(&str) -> bool, control: &ProductionControl<'_>, ) -> Result<MutableQueryPlan, SQLError>
Sourcefn push_output_filter(
&self,
query: &QueryPlan,
qualifier: &str,
filter: &ScalarExpr,
output_columns: Option<&[String]>,
) -> Result<Option<OwnedQueryPlan>, SQLError>
fn push_output_filter( &self, query: &QueryPlan, qualifier: &str, filter: &ScalarExpr, output_columns: Option<&[String]>, ) -> Result<Option<OwnedQueryPlan>, SQLError>
Return a plan that applies the complete output predicate, or None when the caller must retain it.
Provided Methods§
Sourcefn push_derived_output_filter(
&self,
query: &QueryPlan,
qualifier: &str,
filter: &ScalarExpr,
output_columns: Option<&[String]>,
) -> Result<Option<OwnedQueryPlan>, SQLError>
fn push_derived_output_filter( &self, query: &QueryPlan, qualifier: &str, filter: &ScalarExpr, output_columns: Option<&[String]>, ) -> Result<Option<OwnedQueryPlan>, SQLError>
Place a predicate inside an ordinary derived source. Recursive specialization keeps its separate effect boundary through push_output_filter.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".