Skip to main content

Crate cyrs_plan

Crate cyrs_plan 

Source
Expand description

cyrs-plan — logical read/write plan IR (spec 0001 §12).

The plan is a directed acyclic graph of operators. It is logical: no cost model, no cardinality, no physical operator selection. A consumer’s executor takes the plan and produces rows / effects. This crate imposes no runtime contract on that executor beyond the shape of the plan itself (spec §12.5).

§Key types

  • ReadOp — read-side operator tree (spec §12.1).
  • WriteOp — write-side operator list (spec §12.1).
  • Expr — plan-level expression IR (spec §12.2).
  • VarId — plan-scoped variable identity (spec §12.3).
  • OpId — operator identity within a plan graph.

§HIR → Plan lowering

The lower module provides the entry point lower::lower_statement which lowers a post-resolve, post-desugar HIR cyrs_hir::Statement into a lower::PlanStatement (spec §12, bead cy-foy).

Re-exports§

pub use error::PlanLowerError;

Modules§

error
Errors produced by HIR → Plan lowering (spec 0001 §12, bead cy-wlr).
lower
HIR → Plan lowering (spec 0001 §12).
pretty
Human-readable pretty-printer for the plan IR (spec 0001 §12).
ser
Serde implementations for the plan IR (spec 0001 §12).

Structs§

AggExpr
An aggregation call in an AGGREGATE operator.
LabelSet
A set of node labels used in pattern-matching predicates. Spec §12.1.
NodeSpec
Specification for the node endpoint of an expand operator. Spec §12.1.
OpId
Operator identity within a plan graph.
OrderKey
A sort key in an ORDER BY operator. Spec §12.1.
Projection
A single output column of a PROJECT or WITH operator. Spec §12.1.
RelSpec
Specification for the relationship in an expand operator. Spec §12.1.
VarId
Stable plan-scoped identifier for a variable.

Enums§

BinOp
Binary operators. Spec §12.2 E12 / §5.6 / §7.2.
Direction
Relationship traversal direction as written in the source. Spec §5.3.
Expr
Plan-level expression IR. Spec §12.2.
ListPredKind
Discriminant for Expr::ListPredicate (cy-8x5, spec §19 row “List predicates”). Mirrors cyrs_hir::ListPredKind at the plan layer so the HIR is not leaked across the plan boundary.
ReadOp
Logical read-plan operator tree. Spec §12.1.
RelLength
Variable-length relationship bounds. Single means no * qualifier. Spec §5.3.
SortDir
Sort direction for OrderKey. Spec §12.1.
UnaryOp
Unary operators. Spec §12.2 E13 / §5.6 / §7.2.
UnionKind
Disposition of a UNION. Spec §12.1.
WriteOp
Logical write-plan operator. Spec §12.1.