Module datafusion::optimizer
source · Expand description
re-export of datafusion_optimizer
crate
Modules
- Eliminate common sub-expression.
- Optimizer rule to eliminate cross join to inner join if join predicates are available in filters.
- Optimizer rule to replace
where false
on a plan with an empty relation. This saves time in planning and executing the query. Note that this rule should be applied after simplify expressions optimizer rule. - Optimizer rule to replace
LIMIT 0
orLIMIT whose ancestor LIMIT's skip is greater than or equal to current's fetch
on a plan with an empty relation. This rule also removes OFFSET 0 from the LogicalPlan This saves time in planning and executing the query. - Optimizer rule to eliminate left/right/full join to inner join if possible.
- Optimizer rule to extract equijoin expr from filter
- The FilterNullJoinKeys rule will identify inner joins with equi-join conditions where the join key is nullable on one side and non-nullable on the other side and then insert an
IsNotNull
filter on the nullable side since null values can never match. - Query optimizer traits
- Push Down Filter optimizer rule ensures that filters are applied as early as possible in the plan
- Optimizer rule to push down LIMIT in the query plan It will push down through projection, limits (taking the smaller limit)
- Projection Push Down optimizer rule ensures that only referenced columns are loaded into memory
- single distinct to group by optimizer rule
- Unwrap-cast binary comparison rule can be used to the binary/inlist comparison expr now, and other type of expr can be added if needed. This rule can reduce adding the
Expr::Cast
the expr instead of adding theExpr::Cast
to literal expr. - Collection of utility functions that are leveraged by the query optimizer rules
Macros
Structs
- A standalone
OptimizerConfig
that can be used independently of DataFusion’s config management
Traits
- Options to control the DataFusion Optimizer.
OptimizerRule
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 can simply return it as is.
Functions
- Convenience 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
.