Expand description
Segmenting a native tree, so each per-series prefix runs where its input is read.
A tree that reads across series answers one partition and gathers whatever it reads. Its
per-series prefixes do not need that gather, so each is cut out as a FusedSeries node of its
own and keeps the partitions it was scanned with: cut_as_segment decides what can be cut,
cut_segments rewrites the tree into one segment per cut, and segment_tree builds the
nodes, recursing into a cut that wraps a whole-vector consumer.
Everything here reads the bound tree alone. The columns a node publishes are the planner’s
answer, so the builders ask for them through OutputTags, FieldNames and RootSchema
instead of deriving them a second time.
Structs§
- Segment
- One segment: its tree rewritten to read only its own inputs, the scans it reads, and the subtrees cut out of it.
Constants§
- NATIVE_
ORDERING - The ordering this route compiles its trees against: the weakest both scanners provide.
Functions§
- build_
evaluated_ 🔒segment - build_
inner_ 🔒segment - Builds one segment’s plan from a subtree, binding its scan inputs without cutting again.
- canonical_
boundary_ stages - Lowers a tree whose root is a canonical merge into a producer and a canonical router.
- canonical_
local_ prefix - Whether the merge producer’s entire prefix can run on each scan partition independently.
- collect_
segment 🔒 - Collects a segment’s scans and cut subtrees, without descending into a cut.
- collect_
segment_ 🔒inputs - Collects every scan input in a selected segment without looking for nested cuts.
- contains_
canonical_ merge - contains_
global_ consumer - cut_
as_ 🔒segment - Whether
nodebecomes a segment of its own under a parent that must gather. - cut_
segments - Splits
nodeinto one segment and the subtrees cut out of it. - evaluated_
input_ 🔒window - Whether
nodeis a window over an evaluated input - the shape a subquery over anything but a bare selection compiles to. - exportable 🔒
- Whether a segment can hand
node’s values to another segment. - find_
input_ 🔒node - fused_
output_ schema - The columns a
FusedSeriesnode produces. - fused_
publish_ 🔒grid - The grid one
FusedSeriespublishes on: the grid its root declares it produces, or the statement’s grid when the root declares none. - independent_
scan_ pair - is_
canonical_ 🔒cut - Whether a subtree can be cut without inheriting its parent’s global gather.
- is_
empty_ discovered_ input - Whether
planis the typed empty input a discovered selector that matched no table gets. - is_
global_ 🔒consumer - Whole-vector consumers remain global, but can be cut out as evaluated segments so a pointwise parent does not inherit their single-partition placement.
- is_
raw_ 🔒series_ source - is_
sourced_ 🔒plan - Whether
planalready answers raw series frames of its own. - pointwise_
operand - Whether
nodereads samples point-wise, so that one partitioned execution is one answer. - region_
local_ segment - Whether the dist analyzer places a segment over
noderegion-locally. - rewrite_
inner_ 🔒segment - Rewrites every input leaf in a selected segment to its index in the segment’s own space.
- rewrite_
segment 🔒 - Rewrites a segment’s tree so every leaf names its index in the segment’s own space.
- scan_
operand 🔒 - segment_
tree - Plans
treeas several segments, orNonewhen it is one node already. - with_
row_ name_ column - Appends the per-row name column to a rows layout’s tag list.
Type Aliases§
- Field
Names - Derives the value column names a statement’s expression gives the compiled
fields. - Output
Tags - Derives the output tag columns a node publishes, from the tag columns each source declares.
- Root
Schema - The row schema a statement root publishes for
promql, orNonewhen its columns cannot be named once.