Expand description
re-export of datafusion_optimizer
crate
Modules§
- analyzer
Analyzer
andAnalyzerRule
- common_
subexpr_ eliminate CommonSubexprEliminate
to avoid redundant computation of common sub-expressions- decorrelate
PullUpCorrelatedExpr
converts correlated subqueries toJoins
- decorrelate_
predicate_ subquery DecorrelatePredicateSubquery
convertsIN
/EXISTS
subquery predicates toSEMI
/ANTI
joins- eliminate_
cross_ join EliminateCrossJoin
convertsCROSS JOIN
toINNER JOIN
if join predicates are available.- eliminate_
duplicated_ expr EliminateDuplicatedExpr
Removes redundant expressions- eliminate_
filter EliminateFilter
replaceswhere false
orwhere null
with an empty relation.- eliminate_
group_ by_ constant EliminateGroupByConstant
removes constant expressions fromGROUP BY
clause- eliminate_
join EliminateJoin
rewritesINNER JOIN
withtrue
/null
- eliminate_
limit EliminateLimit
eliminatesLIMIT
when possible- eliminate_
nested_ union EliminateNestedUnion
: flattens nestedUnion
to a singleUnion
- eliminate_
one_ union EliminateOneUnion
eliminates single elementUnion
- eliminate_
outer_ join EliminateOuterJoin
convertsLEFT/RIGHT/FULL
joins toINNER
joins- extract_
equijoin_ predicate ExtractEquijoinPredicate
identifies equality join (equijoin) predicates- filter_
null_ join_ keys FilterNullJoinKeys
adds filters to join inputs when input isn’t nullable- optimize_
projections OptimizeProjections
identifies and eliminates unused columns- optimizer
Optimizer
andOptimizerRule
- propagate_
empty_ relation PropagateEmptyRelation
eliminates nodes fed byEmptyRelation
- push_
down_ filter PushDownFilter
applies filters as early as possible- push_
down_ limit PushDownLimit
pushesLIMIT
earlier in the query plan- replace_
distinct_ aggregate ReplaceDistinctWithAggregate
replacesDISTINCT ...
withGROUP BY ...
- scalar_
subquery_ to_ join ScalarSubqueryToJoin
rewriting scalar subquery filters toJOIN
s- simplify_
expressions SimplifyExpressions
simplifies expressions in the logical plan,ExprSimplifier
simplifies individualExpr
s.- single_
distinct_ to_ groupby SingleDistinctToGroupBy
replacesAGG(DISTINCT ..)
withAGG(..) GROUP BY ..
- utils
- Utility functions leveraged by the query optimizer rules
Structs§
- Analyzer
- Rule-based Analyzer.
- Optimizer
- A rule-based optimizer.
- Optimizer
Context - A standalone
OptimizerConfig
that can be used independently of DataFusion’s config management
Enums§
- Apply
Order - Specifies how recursion for an
OptimizerRule
should be handled.
Traits§
- Analyzer
Rule AnalyzerRule
s transformLogicalPlan
s in some way to make the plan valid prior to the rest of the DataFusion optimization process.- Optimizer
Config - Options to control the DataFusion Optimizer.
- Optimizer
Rule 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.