#[non_exhaustive]pub enum GraphOp {
Show 28 variants
NodeScan {
var: VarId,
ty: Option<TypeId>,
},
EdgeScan {
var: VarId,
ty: Option<TypeId>,
},
TypedEdgeScan {
var: VarId,
rel_ty: TypeId,
},
Expand {
src: VarId,
edge: VarId,
dst: VarId,
rel_ty: Option<TypeId>,
dir: Direction,
min_hops: u16,
max_hops: Option<u16>,
},
RelationshipUnique {
edge: VarId,
prior_edges: Vec<VarId>,
},
Filter {
predicate: ExprId,
},
Project {
items: Vec<ProjectItem>,
distinct: bool,
},
Aggregate {
group_by: Vec<ExprId>,
group_aliases: Vec<Option<String>>,
group_vars: Vec<Option<VarId>>,
aggs: Vec<AggExpr>,
},
Sort {
keys: Vec<SortKey>,
},
Limit {
count: u64,
},
LimitParam {
name: String,
},
LimitExpr {
expr: ExprId,
},
Skip {
count: u64,
},
SkipParam {
name: String,
},
SkipExpr {
expr: ExprId,
},
Optional {
child: Box<GraphPlan>,
},
Exists {
child: Box<GraphPlan>,
negated: bool,
},
PatternComprehension {
child: Box<GraphPlan>,
output: VarId,
},
ListElementPatternComprehension {
list_expr: ExprId,
loop_var: VarId,
child: Box<GraphPlan>,
pattern_output: VarId,
filter: Option<ExprId>,
projection: Option<ExprId>,
output: VarId,
},
Union {
all: bool,
inputs: Vec<GraphPlan>,
},
Unwind {
list_expr: ExprId,
alias: VarId,
},
Call {
procedure: ProcedureDefinition,
args: Vec<ExprId>,
yields: Vec<ProcedureYield>,
},
Create {
pattern: CreatePattern,
},
Merge {
pattern: CreatePattern,
on_create: Vec<MergeSetItem>,
on_match: Vec<MergeSetItem>,
},
Delete {
vars: Vec<VarId>,
exprs: Vec<ExprId>,
detach: bool,
},
Set {
items: Vec<SetPropItem>,
map_items: Vec<SetMapItem>,
label_items: Vec<LabelItem>,
},
Remove {
items: Vec<RemovePropItem>,
label_items: Vec<LabelItem>,
},
With {
items: Vec<ProjectItem>,
distinct: bool,
where_predicate: Option<ExprId>,
},
}Expand description
A single operator node in a GraphPlan.
Plans are represented as a flat Vec<GraphOp> (operators in pipeline
order). Recursive structure — e.g. optional matches, unions — is
expressed by variants that embed a child GraphPlan.
This enum is #[non_exhaustive] so that adding new operators in a minor
version does not constitute a breaking change for downstream crates that
match on it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NodeScan
Scan all nodes, optionally filtered to a single label type.
ty: None scans every node regardless of label.
Fields
EdgeScan
Wildcard edge scan across all relation types.
Prefer TypedEdgeScan when the relation type is
statically known; this variant exists for queries that match any edge.
Fields
TypedEdgeScan
Scan topology/edges/TYPENAME.parquet for a specific relation type.
This is the primary edge-scan operator emitted by the binder whenever a
MATCH pattern specifies a concrete relation type. The relational
lowering layer maps rel_ty → relation_name via the ontology (or the
RuntimeCatalog in exploratory mode) to determine the Parquet file
path. In exploratory mode, if rel_ty is a RuntimeTypeId, the
storage layer routes the scan to topology/edges/_exploratory.parquet.
Fields
Expand
Expand from a source node along edges to destination nodes.
Fields
RelationshipUnique
Enforce relationship isomorphism within one path pattern.
Fields
Filter
Retain only rows where predicate evaluates to true.
Project
Project a set of expressions into named output columns.
Fields
items: Vec<ProjectItem>The output columns.
Aggregate
Group rows and compute aggregates.
Fields
group_aliases: Vec<Option<String>>Output column name for each group-by key (parallel to group_by):
Some(name) aliases that key’s result column (openCypher names it by
the RETURN item’s source text), None leaves the lowered expr’s
default name. Empty or shorter-than-group_by ⇒ no aliasing (#599).
Sort
Sort the row stream by one or more keys.
Limit
Retain at most count rows.
LimitParam
Retain at most the row count supplied by a query parameter.
LimitExpr
Retain at most the row count produced by a variable-independent expression.
Skip
Skip the first count rows.
SkipParam
Skip the row count supplied by a query parameter.
SkipExpr
Skip the row count produced by a variable-independent expression.
Optional
Execute a child plan and emit its results, substituting NULL for
unmatched rows (LEFT OPTIONAL semantics).
Exists
Retain or reject rows according to whether a correlated child plan has at least one match (pattern-predicate semantics).
Fields
PatternComprehension
Evaluate a correlated pattern and collect one projected value per match.
Fields
ListElementPatternComprehension
Evaluate a pattern comprehension once per graph-valued list element.
Fields
Union
Combine results from multiple sub-plans.
Fields
Unwind
Iterate over a list expression, binding each element to alias.
Fields
Call
Invoke a registered procedure for every input row.
Fields
procedure: ProcedureDefinitionFrozen signature and deterministic fixture rows.
yields: Vec<ProcedureYield>Procedure outputs introduced into query scope.
Create
Create nodes and/or edges described by pattern.
Write-path execution semantics are deferred to Milestone 13; this variant serialises and deserialises but is not covered by execution tests yet.
Fields
pattern: CreatePatternThe pattern to create.
Merge
Match-or-create semantics for pattern.
Same execution-deferral note as Create.
Fields
pattern: CreatePatternThe pattern to match or create.
on_create: Vec<MergeSetItem>Actions applied only when the pattern is created.
on_match: Vec<MergeSetItem>Actions applied only when the pattern already exists.
Delete
Delete graph entities referenced directly or produced by expressions.
Direct variables use identity columns; runtime expressions may produce
nodes, relationships, paths, or null through list/map access. When
detach is false, deleting a node that still has relationships is an
execution error; detach = true also removes incident edges.
Fields
Set
Set properties on bound graph entities (#791).
Each item assigns one property of a bound node or edge variable to a
value expression evaluated per matched row. Whether a target is a node
or an edge is resolved at lowering from the input row’s identity columns
(node_uuid vs edge_uuid). Label and bulk-map writes execute through
the statement driver.
Fields
items: Vec<SetPropItem>The property assignments, in clause order.
map_items: Vec<SetMapItem>Bulk map merge/replacement assignments, in clause order.
Remove
Remove properties from bound graph entities (#791).
The dual of Set. Removing an absent property or label is
a no-op (openCypher).
Fields
items: Vec<RemovePropItem>The properties to remove, in clause order.
With
Project a set of columns and optionally apply a WHERE predicate, then pass results to subsequent operators (WITH clause semantics).