Conversation
Merged
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Developers need small, reproducible data and queries to compare ASAPPlanner/backend semantics with official Prometheus, with every aggregation and range-vector function bound to an executable plan.
What
Add a Prometheus 3.5.0 catalog covering 14 aggregation operators and 25 range-vector functions, 14 float series/64 samples, and 105 queries with explicit label/value expectations. Provide native exact binding/execution tests and a local HTTP fixture server.
How
Compile the real ASAPPlanner canonical tree into typed exact kernels and evaluate timestamped raw samples locally. The Python runner verifies catalog completeness and compares official promtool or HTTP results, including labels, NaN/Inf, and requested ordering. Sketch binding diagnostics remain separate.
Planner dependency: ProjectASAP/ASAPPlanner#413. Pin
f27b16a747e5d7fcd70a5510075c0cd062f0dcea, which applies that fix on the backend's existing029ff2fdependency to preserve its interfaces. No local path dependencies.Before this PR
There was no complete function-name smoke corpus with executable bindings and official reference expectations; valid special quantile parameters could fail during lowering.
After this PR
Run
cargo +1.98.0 test --locked -p data_plane --test promql_exact_executionto bind and execute all 105 cases locally. For example, equal-valued series still count separately, irate uses the final sample pair, and out-of-range quantile phi produces the defined infinity.Evidence
See
tools/promql-smoke/RESULTS.mdfor the recorded checks andREADME.mdfor reproduction. Screenshots and performance measurements: not applicable.Verification
BOUND_EXACT.asap_exactprovenance; 105 range queries match per-step instant evaluation.-D warnings.The corpus test checks complete result sets, labels, numbers, and ordering. Focused regressions reject invalid snapshots/unsupported modifiers and protect equal-valued counts and negative sampling ratios. Python tests protect comparator and catalog coverage behavior.
Architectural decisions
Exact kernels require raw samples because existing sketches cannot recover all ordered-window semantics. The binder consumes canonical IR rather than reparsing or forwarding the original query. The HTTP example exercises the same library path without changing production routing.
Limitations and follow-up
Function-name coverage is pinned to Prometheus 3.5.0 float samples, not full PromQL conformance. Native histograms, staleness, offsets, @ modifiers, subqueries, and explicit vector matching are outside this path. Production adoption needs a raw-sample source and routing integration. Merge/reconcile the planner dependency before merging this PR.
Human review — do not complete with an agent