pub struct PlanStatement {
pub ops: Vec<ReadOp>,
pub write_ops: Vec<WriteOp>,
pub var_map: IndexMap<VarId, VarId>,
}Expand description
The result of lowering a single HIR Statement to a logical plan.
ops is the operator arena: each entry is a ReadOp and may
reference earlier entries via OpId. The last entry is the root.
If the statement has no read phase (e.g. bare CREATE), ops is
empty and the root is implicit (one write pass over an empty row).
write_ops are applied in order after every row produced by the read
phase. For a pure read query they are empty.
var_map maps plan-scoped VarIds back to HIR HirVarIds for
diagnostic purposes (spec §12.3).
Fields§
§ops: Vec<ReadOp>Ordered flat arena of read operators. References use dense OpId.
write_ops: Vec<WriteOp>Write operators applied after each read-phase row.
var_map: IndexMap<VarId, VarId>Implementations§
Source§impl PlanStatement
impl PlanStatement
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Construct an empty PlanStatement — no read or write operators
and an empty var_map. Useful as a fallback when downstream
callers need a plan shape for a malformed query (cy-wlr).
Trait Implementations§
Source§impl Clone for PlanStatement
impl Clone for PlanStatement
Source§fn clone(&self) -> PlanStatement
fn clone(&self) -> PlanStatement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more