Skip to main content

Module compile_view

Module compile_view 

Source
Expand description

ViewDefinition JSON → PlanNode compiler.

Walks the SoF select tree producing a plan tree rooted in a PlanNode::Scan over resources. Per-clause logic:

  • Plain select.column[] → column projections off the current focus.
  • forEach/forEachOrNullPlanNode::LateralUnnest over the parent.
  • Nested select[] → contributes additional columns under the parent’s focus (or extends the row source if it has its own forEach).
  • unionAll[]PlanNode::Union with sibling column[] merged into each branch.
  • Top-level where[].pathPlanNode::Filter applied to the root scan.

Stages 4–5 add chained-call collection threading, repeat:, and boundary functions.

Functions§

build_plan
Build a plan tree for the given ViewDefinition JSON.