Crate datafusion_optimizer
source ·Expand description
§DataFusion Optimizer
Contains rules for rewriting LogicalPlan
s
-
Analyzer
appliesAnalyzerRule
s to transformLogicalPlan
s to make the plan valid prior to the rest of the DataFusion optimization process (for example,TypeCoercion
). -
Optimizer
appliesOptimizerRule
s to transformLogicalPlan
s into equivalent, but more efficient plans.
Re-exports§
pub use analyzer::Analyzer;
pub use analyzer::AnalyzerRule;
pub use optimizer::Optimizer;
pub use optimizer::OptimizerConfig;
pub use optimizer::OptimizerContext;
pub use optimizer::OptimizerRule;
pub use utils::optimize_children;
Deprecated
Modules§
Analyzer
andAnalyzerRule
CommonSubexprEliminate
to avoid redundant computation of common sub-expressionsPullUpCorrelatedExpr
converts correlated subqueries toJoins
EliminateDuplicatedExpr
Removes redundant expressionsEliminateGroupByConstant
removes constant expressions fromGROUP BY
clauseEliminateLimit
eliminatesLIMIT
when possibleEliminateOneUnion
eliminates single elementUnion
ExtractEquijoinPredicate
identifies equality join (equijoin) predicatesFilterNullJoinKeys
adds filters to join inputs when input isn’t nullableOptimizeProjections
identifies and eliminates unused columnsPropagateEmptyRelation
eliminates nodes fed byEmptyRelation
PushDownFilter
applies filters as early as possiblePushDownLimit
pushesLIMIT
earlier in the query planRewriteDisjunctivePredicate
rewrites predicates to reduce redundancyScalarSubqueryToJoin
rewriting scalar subquery filters toJOIN
sSimplifyExpressions
simplifies expressions in the logical plan,ExprSimplifier
simplifies individualExpr
s.- Utility functions leveraged by the query optimizer rules