Skip to main content

Module native

Module native 

Source
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§

NativeFramePlan 🔒
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§

NativePlanned 🔒

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 node consumes 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 node binds 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 node holds 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_input builds.
epoch_millis 🔒
The moment millis milliseconds 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 plan is 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 prepared order.
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 session SET``), 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 node reads samples point-wise, so that one partitioned execution is one answer.
reads_presence 🔒
Whether expr asks for absent_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 engine can serve raw series frames to the fused-series node.

Type Aliases§

DiscoveredSelectorMetadata 🔒
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.
PreparedInput 🔒
One prepared occurrence of a selector: its scan, raw-series layout and reporting columns.