Expand description
Complete SQL-to-execution-plan lowering.
OperatorTree is the specialised algebra
for posting-list, graph, and fusion operations. It is intentionally not a
relational algebra: forcing a SQL window frame or a mutation into a
posting-list node would erase its row and command semantics. This module
supplies the missing super-plan. Every SQL statement lowers to one
UnifiedPlan, while query-producing statements recursively own their
relational children. A physical driver can therefore use an
OperatorTree as an access path inside a relational node without keeping
a second top-level SQL dispatcher.
Modules§
- locking
- Canonical relation row marks selected by SQL locking analysis.
- source_
projection - Required SQL source columns and explicitly requested relation metadata.
Structs§
- Assignment
Plan - Conflict
Plan - CteCycle
Plan - Generated cycle mark and path columns for a recursive CTE.
- CtePlan
- A named query child owned by a
QueryPlan. - CteSearch
Plan - Generated traversal-order column for a recursive CTE.
- Delete
Plan - Expression
Plan - Executable scalar IR plus every query-valued descendant it owns.
- Insert
Plan - Merge
Plan - Order
Plan - Projection
Plan - Query
Block Plan - One SELECT block after
WITHand set-operation structure has been pulled into explicit parent/child nodes. - Query
Plan - A relational query with its CTE scope and one relational root.
- Table
Function Plan - One independently resolved and bound function inside a range-function group.
- Update
Plan - View
Check Plan - View
Rule Insert Plan - View
Rule Returning Plan - View
Rule Update Plan
Enums§
- Access
Path Plan - Cross-paradigm access decision made after the relational and scalar portions of a query block have both been lowered.
- Command
Plan - Non-query statement plans. Mutations own physical sources and scalar IR; query-bearing catalog commands own explicit query children. Typed DDL and procedural payloads contain catalog data, never a second SQL dispatcher.
- Compute
Plan - The SELECT-list phase chosen during lowering.
- Conflict
Action Plan - CtePlan
Body - A relational CTE or a command whose RETURNING relation feeds its consumers.
- Join
Execution Strategy - Physical strategy selected for a relational join.
- Merge
When Plan - Projection
Target - Identity assigned to one projection result. SQL columns participate in
ordinary name binding and wildcard expansion; internal attributes are
executor-only
resjunkslots addressed structurally. - Relational
Plan - Relational nodes common to ordinary SQL, retrieval SQL, and table/graph functions.
- Source
Plan - The row-producing source below a query block.
- Unified
Plan - One fully lowered SQL statement.
Traits§
- Aggregate
Classifier - Classification hook for engine-registered aggregate functions. Built-in aggregates are always recognised; the callback extends that set without making the planner depend on the engine.
- Executable
Plan Optimizer - Analyze and optimize a logical plan using metadata captured for this call.
Functions§
- rewrite_
scalar_ expression - Visit one scalar-expression tree in post-order and rewrite each node once.