promql-rs docs
Design notes for promql-rs, a PromQL query engine and parser in Rust. The engine compiles PromQL into DataFusion plans over a store that implements SeriesSource.
Engine
-
The
SeriesSourcetraitThe contract a store implements: which series it returns for a selector, cut into which chunks, in which order.
-
The engine
How the engine evaluates a series chunk by chunk: blocks, kernel state, memory ownership, and the execution APIs.
-
How
ratewalks a block and crosses its edgeAn illustrated walkthrough of
rate(x[5m])across two blocks, with a step-through of the block edge and an Arrow buffer inspector.Also as plain text.
-
Migrating to prepared queries
The breaking change to the query-planning API: which calls change, and how to inspect a prepared query before executing it.
Parser
-
Parser and upstream sync
How the parser stays in step with upstream Prometheus: the parser generator,
promql-sync, and the conformance corpus. -
Feature flags
The experimental PromQL syntax Prometheus gates behind
--enable-feature, and the matching parser options.