LogicalOptimizerRule

Trait LogicalOptimizerRule 

Source
pub trait LogicalOptimizerRule {
    // Required methods
    fn try_optimize(
        &self,
        plan: &LogicalPlan,
    ) -> QuillSQLResult<Option<LogicalPlan>>;
    fn name(&self) -> &str;

    // Provided method
    fn apply_order(&self) -> Option<ApplyOrder> { ... }
}
Expand description

LogicalOptimizerRule transforms one LogicalPlan into another which computes the same results, but in a potentially more efficient way. If there are no suitable transformations for the input plan, the optimizer can simply return it as is.

Required Methods§

Source

fn try_optimize( &self, plan: &LogicalPlan, ) -> QuillSQLResult<Option<LogicalPlan>>

Try and rewrite plan to an optimized form, returning None if the plan cannot be optimized by this rule.

Source

fn name(&self) -> &str

A human-readable name for this optimizer rule

Provided Methods§

Source

fn apply_order(&self) -> Option<ApplyOrder>

How should the rule be applied by the optimizer

If a rule use default None, it should traverse recursively plan inside itself

Implementors§