Expand description
The native fused-series route of the PromQL planner.
PromPlanner::try_plan_native_fused offers a whole statement expression to the native compiler and,
when the compiler accepts it, replaces everything the existing path would plan below the root with one
[FusedSeries] node over the selector’s own table scan. A tree that folds across series, such as an
aggregate, is split instead: its per-series prefix and a Partial aggregate run in a FusedSeries
producer, a SeriesRepartitionExec routes that state, and a second FusedSeries runs the Final
aggregate over it, because a region holds only part of a group. Declining is the normal answer: every
shape the compiler does not accept, and every query this route cannot bind to a scan faithfully, keeps
the plan the existing planner builds.
The node is built from the raw series schema the tree’s input was compiled against, the statement’s
evaluation grid, and output tag names derived from the native tree. The output schema has the shape the
existing unary pipeline produces – the time index, then the series fields, then the tags – so a node
planned here is consumed by the same code that consumes a SeriesNormalize output.
A statement that reads no data - a constant, time(), vector(time()) - is planned with no scan: one
node, no child, the time index and value.
Structs§
- Native
Frame 🔒Plan - A fully placed native operand and the evaluated layout its frame carries.
- SetOperand 🔒
- One side of a set operation, as the slice of the pre-order selector list it reads.
- SetOperation 🔒
- One set operation in the statement and the two operands it compares.
Enums§
Constants§
- MAX_
DISCOVERED_ 🔒METRICS - The most metric tables one discovered selector will scan.
- NATIVE_
PROMQL_ EXTENSION_ KEY - The query option that turns the native fused-series route on for one query.
Functions§
- aggregate_
reads_ 🔒histogram - Whether any aggregate in
nodeconsumes histogram samples, wherever it sits in the tree. - binds_
histogram_ 🔒state - Whether this aggregate’s state carries a native histogram.
- binds_
histogram_ 🔒state_ anywhere - Whether any aggregate in
nodebinds a state that carries a native histogram. - collect_
selectors_ 🔒with_ set_ operations - [
collect_selectors], also recording the set operations it passes. - depends_
on_ 🔒input_ order - Whether
nodeholds an operation whose answer depends on the order its input arrives in. - discovers_
metric_ name - Whether a selector names no single table and has to enumerate the schema’s metric tables.
- empty_
discovered_ 🔒frame - empty_
discovered_ 🔒input - The typed empty input of a discovered selector that matched no metric table.
- empty_
discovered_ 🔒series_ schema - The raw series schema of the typed empty input
empty_discovered_inputbuilds. - epoch_
millis 🔒 - The moment
millismilliseconds from the Unix epoch, on whichever side of it that lands. - expression_
field_ 🔒names - The names an expression gives the value columns of
fields. - fused_
output_ 🔒schema - The columns a [
FusedSeries] node produces: its time index, one column per value, then its tags. - independent_
scan_ 🔒pair - is_
empty_ 🔒discovered_ input - Whether
planis the typed empty input a discovered selector that matched no table gets. - local_
empty_ 🔒layouts - The index of the real input each zero-match input is laid out by, in
preparedorder. - metric_
scan_ 🔒and_ table_ id - Recognizes only the metric logical-table scan emitted by
create_table_scan_plan, and reports the logical table’s id together with the scan: the rewrite’s__table_id = <id>restriction is the logical table the rewrite stands for, so it is the identity a selector over it reads. - native_
planned 🔒 - native_
promql_ 🔒requested - Whether the query options of one query ask for the native fused-series route.
- native_
promql_ resolved - Whether one query asks for the native fused-series route, resolved the way planning resolves
it: a stated value wins (
request over sessionSET``), otherwise the engine default answers. - native_
raw_ 🔒plan_ bounds_ region_ reads - Whether this executable plan is the native raw PromQL topology, the one plan shape whose region reads one query-wide body budget cannot deadlock.
- native_
root_ 🔒fields - The native root’s value columns, named from the compiled tree rather than legacy expressions.
- plan_
split_ 🔒aggregate - Builds the two nodes a split native aggregate runs in.
- pointwise_
operand 🔒 - Whether
nodereads samples point-wise, so that one partitioned execution is one answer. - reads_
presence 🔒 - Whether
exprasks forabsent_over_time, whose window is read through a fold that keeps the metric name. - root_
subquery 🔒 - Finds a subquery at the statement root, treating parentheses as transparent.
- same_
table_ 🔒scans - Whether every plan is a scan of one table. Filters, projections and bounds are occurrence-specific and deliberately do not participate in this check.
- scan_
time_ 🔒filter - The time-range filter a selector’s scan reads, from the bounds its compiled requirement names.
- split_
exports_ 🔒histogram_ state - Whether the state a split tree exports is a native histogram’s.
- supports_
native_ 🔒raw_ series - Whether
enginecan serve raw series frames to the fused-series node.
Type Aliases§
- Discovered
Selector 🔒Metadata - What one discovered metric contributes: the shared schema, its time column, the tags the union reports, and the one metric name the single-source shape carries.
- Prepared
Input 🔒 - One prepared occurrence of a selector: its scan, raw-series layout and reporting columns.