Expand description
relate-planner: bind a lowered Query to a LogicalPlan
(ADR-0009), then rewrite MATCH (ADR-0024).
Module map:
plan— plan types, theplanentry point (consumes theQuery) and the canonical plan walks (walk_plan_clausesfor the full clause tree,walk_plan_partsfor part-granular top-level clauses,walk_query_partsfor the same part-granular walk over a not-yet-plannedir::Query)- [
binding] — the variable-binding environment - [
validate] — clause-level semantic validation - [
expr_check] / [pattern] / [agg] — expression, pattern, and aggregation checks used by validation - [
names] — output-column computation (UNION agreement, subquery exports, NEXT-stage seeds) - [
rewrite] — post-bind MATCH rewrites - [
order] — cardinality estimates and MATCH pattern order - [
clause_kind] — the Cypher keyword for a parser / planner-IR clause, the one read/write/schema clause classification behindclause_mutates_storeandclause_projects_rows(its published per-clause answers) - [
access] — the one read/write/schema clause fold over a statement, shared by [namespaces] andquery_type - [
namespaces] — the ADR-0116 namespace classifiers (§2 database-administration commands, §4system/system_ontologiesgates, read/write classification); the §3USErules live in [use_target] query_type— the Neo4j Query API v2queryTypeclassifier (r / w / rw / s), a projection of the shared [access] fold plus the statement’s returned columns (ADR-0332)- [
inline] — the bounded-work plan predicate (which planned statements are quick at this engine’s scale and may run on the calling thread of a worker-stack-asserting connection, ADR-0504) and the cache-hit inline route’s containment rule (whether a raw-string plan-cache hit may run on a thread that never asserted the worker’s stack, ADR-0663)
Structs§
- Cross
Clause Cost - Result of pricing a cross-clause
MATCHpattern against nested-loop re-expansion. - Degree
Moments - The first two moments of an out-degree distribution — what a cost gate
needs to price a chain of hops: the mean fanout is
sum / nodesand the size-biased (excess) degree a trail meets after its first hop issum_sq / sum - 1. Estimates on the histogram’s log2-bucket scale (each bucket read at the uniform mean of its degree range), summed over the selected labels and rel types; a node’s degrees on several selected types are crossed (independently) insum_sq, so it stands for the node’s total degree. - Heavy
Value - A value a key holds more often than most, with a count that is an upper bound on how many admitted values equal it.
- Junction
Split Point - Structural split point of a mixed fixed+varlen single path pattern.
- KeyStats
- The statistics of one
(label, property), over the values the collector’s type gate admitted. - Logical
Plan - Logical plan is a pipeline of clauses (plus UNION).
- NoPattern
Stats - No counts. Ordering uses the bound / equality / label / bare ranks.
- RowEstimate
- A row-count estimate with its provenance: the planner’s reading of an equality predicate on a key.
- Seek
Pick - One indexed seek the start element’s predicates resolve to
(ADR-0486): the winning
(label, property)index pair, the op, the bound, and the count — the equality-before-window pick, the anchored-equality point read (a point lookup, the degenerate tightest window on the same index, carryingBinaryOp::Eq) outranking the comparison window, an ordering spelled once, inbest_seek, never again as separate control flow in a consumer: the ladder’s first measured level (endpoint_estimate) and the plan tree’s seek narration (index_seekin the top-level crate) both consume this one pick.
Enums§
- Basis
- Where an estimate’s rows came from, ordered by trust: a larger variant is more trustworthy. The ordering gates strategies and breaks ties between orientations the cost model prices alike; it never overrides a strictly cheaper cost (a default can win an anchor it genuinely prices lower).
- Contains
Count - Provenance of a plan-time
CONTAINScandidate count (LABS-643): the TEXT index stays the one exact measurement, and without one the count comes from a bounded sample scan of the label’s nodes — exact when the label fits inside the sampler’s bound, an extrapolation beyond it. The variant, never a bare number, says which: no consumer can mistake the extrapolation for the measurement, and the sampled form carries the whole-label scan rows the unseekable filter still pays — the floor the compound start estimate (ADR-0474) maxes with the sampled output. - Cross
Clause Search End - Which endpoint of a cross-clause pattern is cheaper to scan from.
- Estimate
- One canonical endpoint ladder (LABS-351): a bound variable is one
row, then the best measured index signal (equality, the range window,
CONTAINS, then label rows), then the unmeasured rank sentinels.
Measured counts and rank sentinels share one ordered scale (the
constants are ordered,
direction_costcompares them directly), so both the planner’s pattern ordering and the executor’s start-element choice consume the same estimate.pubfor the executor’scheapest_start. - Match
Strategy - Planner-selected physical execution strategy for one
MATCHclause. - Provenance
- How a figure was produced, ordered by trust: a larger variant is more
trustworthy, so a planner level can ask
provenance >= UpperBoundwithout matching. - Query
Type - Neo4j Query API v2
queryTypeof a statement. - System
Composition - What a
systemquery part is rejected for. The gate’s ordering ([part_offence] orders the first three): aWITHaround a SHOW takes the 42NA9 text, thenSHOW CURRENT GRAPH TYPEbeside another command takes its 42001NotAllowedOnSystemDatabasetext, then aCALLbeside a schema catalog takes 42NA9 again, and only a part with none of these falls through to the 42N17 whitelist.
Constants§
- HASH_
JOIN_ MIN_ SIDE_ ROWS - Minimum side-A / incoming row count before a hash join pays for itself.
Traits§
- Pattern
Stats - Live or stubbed counts used to estimate how many rows a pattern endpoint
produces. Every method returns
Nonewhen that signal is unavailable, which is not the same as zero rows. Labels and relationship types arrive as a name beside its planning-timerelate_names::Token(ADR-0541): an implementor reads the id when planning resolved one and falls back to the name only for an unresolved token.
Functions§
- admin_
command_ heads_ statement - ADR-0116 §2, amended 2026-11-04: whether the statement’s body is
headed by a database-administration command — the first top-level
clause after any leading
USEclauses is one of the §2 commands. This is the shape the 42N79 auto-routing gate is scoped to: every headed spelling under a non-systemUSE(bare,YIELD … RETURN …,UNIONarm,ALTER DATABASE) is 42N79. A command later in the body (after e.g. aMATCH, or behind a leadingWITH) is not headed, so that gate passes it through to the namespace gates — where, offsystem, it is the composed-form rejection instead (ADR-0590). Part-granular on the head part only: a command headed in aNEXTstage is already refused by the NEXT-chain rule (is_show_databases_with_next), andUSEclauses never split parts. - apply_
degree - One hop’s fanout over a distinct seed set — the planner’s walk model
and the kernels’ cost gates price a hop leaving distinct nodes with
it (see [
HopRows::Seeds]). - apply_
hop_ bound - One hop’s fanout for a kernel’s cost gate (LABS-991):
apply_degree’s price where the statistics can name one, and — where they cannot (an untyped rel, or a hop leaving an unlabeled node, which the walk model leaves at the input row count) — the out-degree tail over every labeled node (PatternStats::any_degree_tail), unclamped so the bound compounds across a chain’s hops. A hop leaving the walk’s seed on the rel’s start side only: the in-degree and undirected shapes have no histogram to ride and keep the unpriced row count, as does a stats source with no histogram.pubfor the executor kernels’ gate, the one consumer — the planner’s own orientation costs keepapply_degree. - apply_
path_ degree - One hop’s fanout over a path multiset —
apply_degree’s policy without its degree-sum clamp ([HopRows::Paths]): a chained path multiplicity (a quantifier’s second and later hops) whose rows are paths, not distinct nodes.pubfor the frontier family’s cost gate, which prices the DFS’s path count against the distinct endpoints. - best_
seek - The one equality-before-window derivation (ADR-0486): the pick a seek-capable start element’s predicates resolve to — an indexed equality on the folded map first (a point lookup is the degenerate tightest window on the same index, so it outranks), else the servable comparison conjunct’s window. The ladder’s measured level and the plan tree’s seek narration consume this derivation, never a second spelling of the ranking.
- can_
reverse_ path - True when
pathmay be reversed without changing query semantics or element-predicate evaluation order underbound. - can_
reverse_ varlen_ leg - Whether a split var-length leg (whose
elementsmay contain loweredPatternElement::Quantifiedwrappers around anonymous-boundary single hops) can be reversed so that its junction node sits atnodes[0]. - check_
union_ joiners - The one spelling of the UNION joiner-uniformity rule: a query’s part
boundaries are all
UNIONor allUNION ALL, never mixed. The stage validator applies it to every planned stage; the executor’s UNION fold applies it again to bodies that are never stage-validated (COUNT {}/COLLECT {}and conditional branch bodies), so a mixed chain there fails with this typed error instead of reaching the fold. - clause_
is_ ddl_ command - The grammar-ending DDL family: the commands whose own grammar ends at
its
OPTIONS/EOF, so no continuation may follow them. Membership is decided here, explicitly — not throughclause_class, which is the access classification and putsALTER DATABASEinWrite: - clause_
keyword - The Cypher clause keyword(s) for any parser
Clause— e.g."MATCH","SHOW INDEXES". The table lives beside the enum (relate_parser::Clause::keyword); this keeps the planner’s existing public path. - clause_
mutates_ store - Whether
clauseis a mutation operator against the store — the ONE published per-clause answer to “does this clause write?”, read by the namespace gates,validate.rs’s composition rules, the executor’s ADR-0402 statement write-attempt walk and its read-path admission policy alike, so no consumer keeps a second list of write clauses. - clause_
projects_ rows - Whether
clauseprojects statement rows of its own: aRETURN, a row-producing catalog command (the SHOW family andTERMINATE TRANSACTIONS),MATCH/WITH/UNWIND/CALL { … }/WHENand every other read clause do; a data write,FINISHand schema/admin DDL do not. The one published per-clause answer to “does this clause produce rows?”, besideclause_mutates_storeand read by the executor’sCALL { … }merge policy and NEXT-stage seeding policy, so no consumer keeps a second list of write clauses. - clause_
writes_ store - Whether
clausemutates the store as the composition rules and the executor read it: the clause table’s answer (clause_mutates_store) minusLOAD CSV, which only reads a file — the table classes itWritefor the conservative access fold (ADR-0332), but it never makes a part (or stage) a writing one. The ONE home of that “LOAD CSV is not a store mutation” fact, beside the table it refines; the 42I25 composition rule and the executor’s per-clause write-attempt answer both read it.CALLstaysReadhere: the registry’s writes flag is the caller’s layer’s fact. - composed_
show_ current_ user - The composition rule for
SHOW CURRENT USER, the second command live refuses composed offsystem(51N28, verified 2026.10.1:SHOW CURRENT USER YIELD user MATCH (n) RETURN n). Same shape rule ascomposed_show_databases, but a composition-only classifier: the ADR-0116 §2 vocabulary ([DatabaseAdminCommand]) is untouched, so the bare command’s behaviour and thesystem_ontologiesexemption (is_database_admin_command) do not move.SHOW USERS/ROLES/SERVERSare not covered: they were not probed (SHOW USERSdoes not compose on live at all — a parse error). - composed_
show_ databases - ADR-0590: the command spelling for a plan that composes
SHOW DATABASESwith other clauses, orNonewhen every occurrence stands in the canonical shape (the command alone, or with a trailingRETURNover its yielded columns, as the statement’s whole body). Off thesystemnamespace such a plan is CE’s 51N28NotSystemDatabaseError; onsystemthe command is where it belongs and §4’s clause whitelist governs instead. - composed_
system_ offence - ADR-0116 §4: the clause kind CE forbids in a query part that composes a
SHOW command on the
systemnamespace —WITH, the one tail clause the §4 whitelist (collect_system_offenders) still allows after a SHOW’sYIELD. The composition test is [is_system_show], the same predicate the whitelist’s head set reads. Live CE 2026.09/2026.10 rejects the composed command withThe following clauses are not allowed on a system database: WITH.(GQLSTATUS 42NA9) for both the… YIELD … WITH …and theWITH … <command> …spelling (position within the part is not part of the rule); the other §4 offenders keep CE’s 42N17 text. Scope is every catalog command thesystemnamespace admits (SHOW PROCEDURES,SHOW FUNCTIONS,SHOW SETTINGS,SHOW CURRENT GRAPH TYPE,SHOW TRANSACTIONS, …), not only the §2 administration commands.SHOW CURRENT GRAPH TYPEbeside another command, and aCALLbeside a per-database schema catalog (SHOW INDEXES,SHOW CONSTRAINTS), are the further offenders ([part_offence] orders the rules). Returns the first offending part’sSystemComposition, orNonewhen no part offends. - conditional_
declared_ columns - The declared column list of a
WHENclause: the same derivation [part_output_names] runs, with no enclosing seed and no CALL-scope import exclusion. - crossover_
scan_ rows - ADR-0493’s range-seek crossover policy —
pubfor the executor funnel, the policy’s second consumer (the ladder is the first). ADR-0493’s range-seek crossover policy —pubfor the executor funnel, the policy’s second consumer (the ladder is the first). ADR-0493’s range-seek crossover policy —pubfor the executor funnel, the policy’s second consumer (the ladder is the first). ADR-0493’s crossover population — the scan a range seek replaces is the pattern’s label conjunction, sized by its smallest label. The one fold both consumers ride (the ladder’sbest_rangeover the planner’s stats, the executor funnel’sSeek::crossover_declinesover the graph’s counts):Nonewhen the pattern names no label or any label is unmeasured (no measurement, no gate — ADR-0486’s default). Allocation-free: the executor’s cheapest-start loop runs it per (pattern, row) (LABS-351). - detect_
junction_ split - Detect whether
patterncan be split at a named junction node separating a purely fixed-length leg from a variable-length/quantified leg with no shared non-junction variables. - endpoint_
estimate - evaluate_
cross_ clause_ cost - Canonical cost helper for cross-clause HashJoin vs nested-loop expansion.
- expr_
text - Render
exprthe way the query spelled it, as far as the IR retains the spelling. Idempotent and allocation-light; recursion follows the arms below, which cover every variant either by rendering its operands or by naming its structural form. - hit_
is_ inline_ safe - The cache-hit inline route’s containment rule (ADR-0663), in its one home: whether a raw-string cache hit may run its statement on a thread that never asserted the query worker’s stack budget. Every conjunct must hold —
- is_
database_ admin_ command - ADR-0116 §2: database-administration commands run from any namespace and
execute against the store’s catalog (the
neo4jgraph). A plan qualifies when every clause is a database-administrationCatalogcommand. - is_
show_ databases_ with_ next - ADR-0116 §2: whether the plan combines
SHOW DATABASESwith aNEXTstage. The front-end’s NEXT-chain validation rejects the combination before planning; this classifier is the execution-phase backstop the facade checks after its EXPLAIN early return (EXPLAIN plans without executing, so the rule does not apply there). Part-granular over every stage’s TOP-LEVEL clauses, matching the front-end’s per-body scan: aSHOW DATABASESnested in an expression subquery does not participate in aNEXTchain. - is_
write - The write classifier is a projection of the one shared clause fold
([
crate::access::plan_access]): each part’s TOP-LEVEL clauses (plusNEXTstages andWHEN/ELSEbranch bodies) only — it deliberately does NOT descend intoCALL { … }bodies or expression subqueries, because the fold already classifies a top-levelCALL { … }as a write outright and a read-onlyCALL { … }nested in anEXISTS/COUNT/COLLECTexpression must not reclassify the statement as a write. Schema (index/constraint DDL) counts as a write here; see [crate::access::Access::is_write]. - junction_
legs_ have_ cross_ inline_ refs - Return
truewhen any inline elementWHEREclause or property map on one leg references a non-junction variable owned by the opposite leg. - plan
- Bind AST to a logical plan (ADR-0009), then rewrite MATCH (ADR-0024).
- plan_
any_ clause - Whether any clause of
plan(viawalk_plan_clauses) satisfiespred— the one walk-and-accumulate boolean over plan clauses, so classifiers stay one-line predicates instead of hand-rollinglet mut found = false; … found |= …; found. - plan_
calls_ write_ procedure - Whether any
CALLof a write procedure appears anywhere in the plan.crate::walk_plan_clausesdescends intoCALL { … }subqueries,WHEN/ELSEbranches,FOREACHbodies, expression subqueries andNEXTstages, so a write procedure nested in any of those positions still counts — the query-type classification reads it (crate::query_type). - plan_
contains_ dynamic_ operands - Whether a plan references any dynamic name operand — a dynamic
label (
LabelExpr::Dynamic, in a pattern’s label expressions or a label predicate) or a dynamic property key (Expr::DynamicProperty). ADR-0503’s insert gate reads this: the front validates such operands against bound values at lowering time (LABS-709 — the check has a content half, an empty or null-byte name, beyond its type half), and a cache hit skips lowering, so a plan carrying one must not be cached — the statement stays uncached, never silently unvalidated. - plan_
contains_ in_ transactions - ADR-0210: whether the plan carries
CALL { … } IN TRANSACTIONSanywhere (top level or nested in aCALL { }body — the nested form is rejected by [crate::validate], so in practice this is the top-level batched subquery). The facade’s auto-commit write path uses this to attach the per-batch commit sink. - plan_
has_ bound_ float_ integer_ site - Whether executing
planwith these parameters would accept a float where the original literal is rejected at plan time (a slice bound or a list index). The plan-cache hit path uses this to fall back to the original statement, which reports the compile error. - plan_
is_ bounded_ work - Whether
planis bounded-work — every clause a bounded shape, no scope-bearing expression — the plan fact the ADR-0504 fast path routes on: a bounded-work statement may run on the calling thread of a connection that asserted the worker stack. The predicate errs towardfalse: anything with data-proportional work (variable-length or quantified paths, GPM patterns, vector search, any write clause — an auto-commit write must never run inline, where a client that gave up waiting cannot be kept alive by ADR-0312’s NOOPs while its write lands; and writes already pay WAL/commit latency that dwarfs the handoff), unbounded row potential (UNWIND,LOAD CSV), the cartesian class (multi-pattern MATCH whose patterns share no variables — the one read shape whose row product is quadratic in the store and breaks the keep-alive interval’s arithmetic), nested engines (CALL {},WHEN/ELSE,FOREACH), or procedure calls escalates to the query worker, whose wait keeps ADR-0312’s NOOP keep-alive ticking for the statements that can actually outlive it. - plan_
is_ create_ only - Whether
planmay join a pipelined write batch (ADR-0642): the statement’s only mutating clause isCREATE, it produces no rows, and it is a single part with noUNIONand noNEXT. The Bolt session opens one commit for a framed message batch’s run of these, so the statement shape is the conservative gate, not a performance hint. - plan_
missing_ parameters - The parameters
planreferences butparamsdoes not supply — the ADR-0308 predicate, in one place. Two consumers read it: the facade’s admission gate, which refuses the statement (connection::dispatch:: post_explain_gates), and the01N60notice the notification derivation raises underEXPLAIN(ADR-0363), so the refusal and the notice can never disagree about which names are unbound. - plan_
output_ names - The output column names of a planned statement (ADR-0319): the names the
final stage’s
RETURN/YIELD/SHOWexports, through the same output-name analysis semantic validation uses. The engine reports them for a statement whose execution failed, so a surface can still announce its columns. A planned statement already passed the UNION column-agreement check, so theErrarm is that check’s error; callers that hold aplan-produced statement share the one expect policy (plan_output_names_expect). - plan_
output_ names_ expect plan_output_namesfor a caller that holds a planned statement: theErrarm is the UNION column-agreement check, whichplanalready ran, so a planned statement’s output names always derive. The one expect for that invariant, shared with the facade’sExecutionFailure::staged(ADR-0319, ADR-0332).- plan_
parameter_ names - The parameter names
planreferences ($name), each once, in the order of first appearance in the full-descent walk (walk_plan_clauses’ coverage: UNION arms,NEXTstages, subqueries, branches,FOREACHbodies and pattern payloads). The facade checks them against the supplied parameters before dispatch (ADR-0308). - plan_
references_ auto_ parameter - Whether any expression of the plan references an auto-extracted
placeholder parameter (ADR-0503’s
__AUTO_*__names). Public for its two consumers, which must agree by construction (ADR-0663): the containment rule’s conjunct (a placeholder-referencing plan makes the dispatch epilogue re-parse the statement’s raw text to restore authored column names — recursion with the statement’s own nesting, the query worker’s stack, not an arbitrary caller’s) and that very epilogue, which consults this fact as its re-parse trigger so the two sites can never diverge. Over-declining is the safe direction: a placeholder in a non-projected position declines too. - plan_
with_ stats planwith cardinality hints for MATCH ordering (ADR-0218).- plan_
with_ tokens plan_with_statsafter resolving the statement’s labels, relationship types and property keys to token ids againstresolver(ADR-0541), once, before any planning step reads them. The ids ride the compiled plan; the caller’s statement tree (cloned intoquery) stays id-free.- query_
any_ clause - The not-yet-planned
Queryanalog ofplan_any_clause, ridingwalk_query_parts(top-level clauses per part,NEXTstages; the caller’s predicate decides which nested queries to descend into). - query_
type - Classify a planned statement into its Neo4j Query API v2
queryType. - query_
with_ persistent_ imports - Rewrite
queryso every imported name survives itsWITHs: the name is added as a bare-variable projection item where the item list does not already carry it, and the terminalRETURNof aNEXTstage gets the same treatment. Validation uses the rewrite to admit the imports; the executor’s expression subqueries (EXISTS/COUNT/COLLECT) use it so an implicitly imported outer variable stays a grouping key of an aggregatingWITH. A query transformation, not a validation check: this module already owns the import/export name computation. - range_
seek_ gated - ADR-0493’s range-seek crossover policy —
pubfor the executor funnel, the policy’s second consumer (the ladder is the first). ADR-0493’s range-seek crossover policy —pubfor the executor funnel, the policy’s second consumer (the ladder is the first). ADR-0493’s range-seek crossover policy —pubfor the executor funnel, the policy’s second consumer (the ladder is the first). ADR-0493’s gate over a population:truewhen a measured scan population makes the window cheaper as the label scan — the one composition ofcrossover_scan_rowsand [range_seek_wins] both consumers apply, so pricing and execution decline the same windows. - reverse_
path - Reverse a linear path pattern in place, flipping its node/relationship sequence and relationship directions.
- reverse_
varlen_ leg - Reverse a split var-length leg in place, flipping both
nodes/relsandelements(including lowered single-hopPatternElement::Quantifieditems). - seed_
on_ rel_ start - Which side of
rela walk’s seed node rides (LABS-426): the typed derivation every walk-orientation consumer shares — a written-outgoing rel seeded from its start side walked forward, a written-incoming one seeded from its start side walked reversed, and an UNDIRECTED rel has no start side in either orientation (the mean stays; the histogram is keyed by the start side only).reverse_pathflips directions, so a post-reversal spelling is its own written direction. - seed_
rows - split_
junction_ legs - Split
patternatsplitinto(fixed_leg, var_leg), preserving alignednodes,rels, andelementsslices on both legs. - unsupported_
system_ clause_ names - ADR-0116 §4: on a
systemsession only SHOW commands, supported administration commands and standalone procedure calls (CALL … [YIELD …] [RETURN …]) run. Returns the offending clause kinds (deduplicated, in order of appearance) for CE’s 42N17 text, orNonewhen the statement is allowed. - walk_
cost - The walk cost of an endpoint estimate over
hops— the ONE model of which estimate kind gets which walk, read by the planner’sdirection_cost(the whole pattern’s hop chain) and the executor’sGraphStats::estimate(the first hop of the same chain), so the per-row start selection and the plan-time orientation cannot disagree on the anchor (LABS-671’s insurance test ties them at the executor side). A measured seed walks the degree-scaled chain; a sampledCONTAINSseed compounds (ADR-0474): its walk cost is the degree-scaled output floored at the whole-label scan — the scan is paid once, before any hop, so it never rides the degree (GBL SF0.1 q8: the 13,750-row Forum scan floor keeps the 137-row sampled title seed from undercutting Person’s 1,528-row scan whose degree-scaled walk lands on the same 13,750 rels). A rank sentinel carries no measured label to scale — its rows travel unscaled. - walk_
plan_ clauses - The canonical way to visit every clause of a
LogicalPlan: each part’s clause tree viarelate_ir::walk_clauses— UNION arms are parts, andCALL { … }subqueries,WHEN/ELSEbranches,FOREACHbodies and expression subqueries are all descended into — recursing intoNEXTstages. Hand-rolling aplan.parts+plan.nextrecursion instead of calling this is how coverage of a nesting position gets dropped. - walk_
plan_ parts - The canonical way to visit a
LogicalPlanPART BY PART: each part’s TOP-LEVEL clause slice (UNION arms are parts), recursing intoNEXTstages — with no descent intoCALL { … }bodies,WHEN/ELSEbranches,FOREACHbodies or expression subqueries. - walk_
query_ parts - The canonical way to visit a not-yet-planned
QueryPART BY PART — their::Queryanalog ofwalk_plan_parts: each part’s TOP-LEVEL clause slice (UNION arms are parts), recursing intoNEXTstages — with no descent intoCALL { … }bodies,WHEN/ELSEbranches,FOREACHbodies or expression subqueries. - where_
conjuncts_ of - The where clause as its conjunct list — the ladder’s CONTAINS level
reads individual conjuncts, the executor passes its residual conjuncts
in this shape natively, and the plan tree’s seek narration (ADR-0486)
reads the same view, so no consumer re-flattens the
ANDtree.
Type Aliases§
- Bound
- The bound check as a membership predicate, not a concrete collection:
the executor’s
cheapest_startruns once per (pattern, row) and must not clone the row’s keys into aHashSetper call (LABS-351, stellar F-3-1). - Hop
- One hop of the walk model’s input: the node the walk is leaving,
the rel it traverses, and the hop’s derived orientation fact
(
seed_is_start, from the one typed derivationseed_on_rel_start) — computed once by the orientation owner, never re-derived inside the walk.