Crate datafusion_optimizer
source ·Re-exports
pub use optimizer::OptimizerConfig;
pub use optimizer::OptimizerContext;
pub use optimizer::OptimizerRule;
pub use utils::optimize_children;
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.
ExtractEquijoinPredicate
rule that extracts equijoin predicates- 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