Expand description
re-export of datafusion_optimizer crate
Modules§
- analyzer
AnalyzerandAnalyzerRule- common_
subexpr_ eliminate CommonSubexprEliminateto avoid redundant computation of common sub-expressions- decorrelate
PullUpCorrelatedExprconverts correlated subqueries toJoins- decorrelate_
lateral_ join DecorrelateLateralJoindecorrelates logical plans produced by lateral joins.- decorrelate_
predicate_ subquery DecorrelatePredicateSubqueryconvertsIN/EXISTSsubquery predicates toSEMI/ANTIjoins- eliminate_
cross_ join EliminateCrossJoinconvertsCROSS JOINtoINNER JOINif join predicates are available.- eliminate_
duplicated_ expr EliminateDuplicatedExprRemoves redundant expressions- eliminate_
filter EliminateFilterreplaceswhere falseorwhere nullwith an empty relation.- eliminate_
group_ by_ constant EliminateGroupByConstantremoves constant expressions fromGROUP BYclause- eliminate_
join EliminateJoinrewritesINNER JOINwithtrue/null- eliminate_
limit EliminateLimiteliminatesLIMITwhen possible- eliminate_
nested_ union EliminateNestedUnion: flattens nestedUnionto a singleUnion- eliminate_
one_ union EliminateOneUnioneliminates single elementUnion- eliminate_
outer_ join EliminateOuterJoinconvertsLEFT/RIGHT/FULLjoins toINNERjoins- extract_
equijoin_ predicate ExtractEquijoinPredicateidentifies equality join (equijoin) predicates- filter_
null_ join_ keys FilterNullJoinKeysadds filters to join inputs when input isn’t nullable- optimize_
projections OptimizeProjectionsidentifies and eliminates unused columns- optimizer
OptimizerandOptimizerRule- propagate_
empty_ relation PropagateEmptyRelationeliminates nodes fed byEmptyRelation- push_
down_ filter PushDownFilterapplies filters as early as possible- push_
down_ limit PushDownLimitpushesLIMITearlier in the query plan- replace_
distinct_ aggregate ReplaceDistinctWithAggregatereplacesDISTINCT ...withGROUP BY ...- scalar_
subquery_ to_ join ScalarSubqueryToJoinrewriting scalar subquery filters toJOINs- simplify_
expressions SimplifyExpressionssimplifies expressions in the logical plan,ExprSimplifiersimplifies individualExprs.- single_
distinct_ to_ groupby SingleDistinctToGroupByreplacesAGG(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
OptimizerConfigthat can be used independently of DataFusion’s config management
Enums§
- Apply
Order - Specifies how recursion for an
OptimizerRuleshould be handled.
Traits§
- Analyzer
Rule AnalyzerRules transformLogicalPlans 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 OptimizerRules transforms oneLogicalPlaninto 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.