Skip to content

test(e2e): answer #509's PromQL examples like the Planner executor - #822

Draft
zzylol wants to merge 1 commit into
feat/query-enginefrom
test/e2e-examples
Draft

zzylol wants to merge 1 commit into
feat/query-enginefrom
test/e2e-examples

Conversation

@zzylol

@zzylol zzylol commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Stack 5/5. Base: #821.

Before this PR

No test checked that the data plane's answers match the Planner's.

After this PR

data_plane/tests/e2e_examples.rs runs the real data_plane binary for #509's PromQL Examples 1, 3a, 3b, 4a and 4b:

  • data goes in through Remote Write;
  • a stand-in Prometheus serves the raw ranges;
  • each answer is compared with the Planner executor running the same workload with no ingestion-time state.

Example 1 runs fully at query time; 3b and 4b use stored panes.

Examples 3a/4a match within a value tolerance of 10, about twice KLL's 0.005 rank error. asap_sketchlib's KLL seeds its compaction from the thread RNG, so results above k vary between runs. The other examples match exactly.

Testing

cargo test -p data_plane --test e2e_examples (5 tests).

🤖 Generated with Claude Code

For Examples 1, 3a, 3b, 4a and 4b: plan the workload, start the data_plane
binary against a Prometheus holding generated samples, Remote Write the
same samples, and require every planned query to be answered by the plan
with the Planner executor's result for the workload planned without
ingestion-time state. Exact families must match exactly; Example 3a/4a's
five-year KLL windows exceed k and KLL compaction is randomized, so they
must agree within twice the 0.005 rank target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant