Module datafusion::optimizer
source · Expand description
re-export of datafusion_optimizer
crate
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
Structs§
- A rule-based Analyzer.
- A rule-based optimizer.
- A standalone
OptimizerConfig
that can be used independently of DataFusion’s config management
Traits§
AnalyzerRule
s transformLogicalPlan
s in some way to make the plan valid prior to the rest of the DataFusion optimization process.- Options to control the DataFusion Optimizer.
OptimizerRule
s transforms oneLogicalPlan
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 should simply return it unmodified.
Functions§
- optimize_childrenDeprecatedConvenience rule for writing optimizers: recursively invoke optimize on plan’s children and then return a node of the same type. Useful for optimizer rules which want to leave the type of plan unchanged but still apply to the children. This also handles the case when the
plan
is aLogicalPlan::Explain
.