Struct datafusion::optimizer::constant_folding::ConstantFolding [−][src]
pub struct ConstantFolding {}
Expand description
Simplifies plans by rewriting Expr
`s evaluating constants
and applying algebraic simplifications
Example transformations that are applied:
expr = true
andexpr != false
toexpr
whenexpr
is of boolean typeexpr = false
andexpr != true
to!expr
whenexpr
is of boolean typetrue = true
andfalse = false
totrue
false = true
andtrue = false
tofalse
!!expr
toexpr
expr = null
andexpr != null
tonull
Implementations
Trait Implementations
fn optimize(
&self,
plan: &LogicalPlan,
execution_props: &ExecutionProps
) -> Result<LogicalPlan>
fn optimize(
&self,
plan: &LogicalPlan,
execution_props: &ExecutionProps
) -> Result<LogicalPlan>
Rewrite plan
to an optimized form