Skip to main content

Module native

Module native 

Source
Expand description

The native PromQL evaluation model.

A query compiles to a plan::NativeTree: nodes whose operations, fields and grids are already bound. Nodes hand each other batch::EvaluatedChunks as ordinary Rust values, so no row batch is materialised between them. metrics names each node after its position in that tree.

Three properties keep this apart from recognising a query shape in a finished physical plan:

  • Legality is a type and data-dependency question (plan::NativeNode::validate), so a new combination of supported operations is an ordinary tree, not another matcher.
  • A window binds its input and output grids separately, so a subquery’s inner grid is consumed as it is instead of being resampled onto the outer grid.
  • A series closes exactly once, on the chunk that says so, so a consumer can tell “nothing more here” from “no more input”.

Modules§

aggregate 🔒
The run-time state of an aggregate node.
batch
The batches native nodes hand to each other.
canonicalize
Puts a canonical merge where a label rewrite made one necessary.
display
One line per node of a NativeTree.
execute
Running a bound tree, node by node.
metrics
Per-node metric handles for native PromQL execution and their DataFusion registration.
plan
The bound tree a native PromQL evaluation compiles to.
segment
Segmenting a native tree, so each per-series prefix runs where its input is read.
split 🔒
Where a native aggregate is split so two planes can run it.
state 🔒
The aggregate-state chunk a native Partial/Final aggregate passes between executions.