Re-exportsΒ§
- pub use plan_node::Explain;
- pub use plan_node::LogicalPlanRef;
- pub use plan_node::PlanRef;
ModulesΒ§
- backfill_order_ strategy 
- delta_join_ πsolver 
- The solver for delta join, which determines lookup order of a join plan.
All collection types in this module should be BTreeto ensure determinism between runs.
- heuristic_optimizer π
- logical_optimization π
- optimizer_context π
- plan_expr_ rewriter 
- plan_expr_ πvisitor 
- plan_node 
- Defines all kinds of node in the plan tree, each node represent a relational expression.
- plan_rewriter π
- plan_visitor π
- property
- Define all property of plan tree node, which actually represent property of the nodeβs result.
- rule π
- Define all Rule
MacrosΒ§
- for_all_ πphase 
StructsΒ§
- ExecutionMode Decider 
- LogicalOptimizer 
- OptimizationStage 
- OptimizerContext 
- PlanPhase Batch 
- PlanPhase Batch Optimized Logical 
- PlanPhase Logical 
- PlanPhase Stream 
- PlanPhase Stream Optimized Logical 
- PlanRoot 
- PlanRootis used to describe a plan. planner will construct a- PlanRootwith- LogicalNode. and required distribution and order. And- PlanRootcan generate corresponding streaming or batch plan with optimization. the required Order and Distribution columns might be more than the output columns. for example:
- RelationCollector Visitor 
- TODO(rc): maybe we should rename this to DependencyCollectorVisitor.
- SysTableVisitor 
TraitsΒ§
- PlanPhase 
- PlanPhaseis used to track the phase of the- PlanRoot. Usually, it begins from- Logicaland ends with- Batchor- Stream, unless we want to construct a- PlanRootfrom an intermediate phase. Typical phase transformation are:
- PlanVisitor 
FunctionsΒ§
- const_eval_ πexprs 
- exist_and_ πno_ exchange_ before 
- find_version_ πcolumn_ indices 
- inline_session_ πtimezone_ in_ exprs 
- require_additional_ πexchange_ on_ root_ in_ distributed_ mode 
- As we always run the root stage locally, for some plan in root stage which need to execute in compute node we insert an additional exhchange before it to avoid to include it in the root stage.
- require_additional_ πexchange_ on_ root_ in_ local_ mode 
- The purpose is same as require_additional_exchange_on_root_in_distributed_mode. We separate them for the different requirement of plan node in different execute mode.