Module optimizer

Source
Expand description

re-export of datafusion_optimizer crate

Modules§

analyzer
Analyzer and AnalyzerRule
common_subexpr_eliminate
CommonSubexprEliminate to avoid redundant computation of common sub-expressions
decorrelate
PullUpCorrelatedExpr converts correlated subqueries to Joins
decorrelate_predicate_subquery
DecorrelatePredicateSubquery converts IN/EXISTS subquery predicates to SEMI/ANTI joins
eliminate_cross_join
EliminateCrossJoin converts CROSS JOIN to INNER JOIN if join predicates are available.
eliminate_duplicated_expr
EliminateDuplicatedExpr Removes redundant expressions
eliminate_filter
EliminateFilter replaces where false or where null with an empty relation.
eliminate_group_by_constant
EliminateGroupByConstant removes constant expressions from GROUP BY clause
eliminate_join
EliminateJoin rewrites INNER JOIN with true/null
eliminate_limit
EliminateLimit eliminates LIMIT when possible
eliminate_nested_union
EliminateNestedUnion: flattens nested Union to a single Union
eliminate_one_union
EliminateOneUnion eliminates single element Union
eliminate_outer_join
EliminateOuterJoin converts LEFT/RIGHT/FULL joins to INNER 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 and OptimizerRule
propagate_empty_relation
PropagateEmptyRelation eliminates nodes fed by EmptyRelation
push_down_filter
PushDownFilter applies filters as early as possible
push_down_limit
PushDownLimit pushes LIMIT earlier in the query plan
replace_distinct_aggregate
ReplaceDistinctWithAggregate replaces DISTINCT ... with GROUP BY ...
scalar_subquery_to_join
ScalarSubqueryToJoin rewriting scalar subquery filters to JOINs
simplify_expressions
SimplifyExpressions simplifies expressions in the logical plan, ExprSimplifier simplifies individual Exprs.
single_distinct_to_groupby
SingleDistinctToGroupBy replaces AGG(DISTINCT ..) with AGG(..) GROUP BY ..
utils
Utility functions leveraged by the query optimizer rules

Structs§

Analyzer
Rule-based Analyzer.
Optimizer
A rule-based optimizer.
OptimizerContext
A standalone OptimizerConfig that can be used independently of DataFusion’s config management

Enums§

ApplyOrder
Specifies how recursion for an OptimizerRule should be handled.

Traits§

AnalyzerRule
AnalyzerRules transform LogicalPlans in some way to make the plan valid prior to the rest of the DataFusion optimization process.
OptimizerConfig
Options to control the DataFusion Optimizer.
OptimizerRule
OptimizerRules transforms one LogicalPlan 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.