Trait datafusion_optimizer::optimizer::OptimizerRule
source · pub trait OptimizerRule {
fn optimize(
&self,
plan: &LogicalPlan,
optimizer_config: &mut OptimizerConfig
) -> Result<LogicalPlan>;
fn name(&self) -> &str;
}Expand description
OptimizerRule 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
sourcefn optimize(
&self,
plan: &LogicalPlan,
optimizer_config: &mut OptimizerConfig
) -> Result<LogicalPlan>
fn optimize(
&self,
plan: &LogicalPlan,
optimizer_config: &mut OptimizerConfig
) -> Result<LogicalPlan>
Rewrite plan to an optimized form