feat: expose physical-ready logical candidates in Planner selection - #472
Merged
Merged
Conversation
Logical-planning half of #462; no physical crate. - Rate heap Top-K and grouped Rate/Sum summary placements (fixed-window and query-time Rate candidates, current-series/counter-value inputs) - Exact-candidate admission: CostModel::summary_support_evidence hook, maintained exact values admitted alongside approximate Top-K/Count, division accepts exact guarantees - Candidate-root enumeration (enumerate_candidate_dags[_for_root], assemble_selected_query) with budgeted, non-partial inventory - PromQL series identity: reserved $promql_series_identity column so closed schemas can still be recognized as PromQL populations; direct rate/increase topk keeps counter-value ranking intent - Per-series reduction resolves the sample column instead of guessing - HLL confidence: standalone hll_confidence module dropped; it duplicated ClassicHllConfidence already on main in accuracy/estimators/hll.rs (#460) - Update planner Top-K reference test to filter heap candidates now that exact maintained-value candidates also appear Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 29, 2026
Selvomega
added a commit
that referenced
this pull request
Sep 29, 2026
Brings in #469, #470 (ExecutableDag -> PostAsapDag), #472 and #478. Conflict resolution: keep the #466 any_measure_filtered guard on the TopK site and adopt main's relaxed `TopK { k, .. }` pattern; keep the #466 corr FILTER test with main's comment wording. Two Aggregate constructions added by #472 gained the #466 `filters` field. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Sep 29, 2026
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.
Part 1 of the #462 split, logical planning only. It is independent of the physical crate and can merge on its own.
Before this PR
For an approximate target like
topk(5, rate(http_requests_total[5m]))with ε=0.01, the Planner only kept sketch candidates. Exact per-series Rate state, grouped Rate/Sum at the query placement, and heap candidates over finalized per-series rates weren't offered, so a physical compiler had nothing executable to choose.After this PR
$promql_series_identity), so Rate and heap readouts keep labels the query doesn't name.Example: for
topk(5, …)andtopk(10, …)over the same rate, the workload now shares one exactRate → Finalize → Sortprefix and differs only in the finalLimit.dag_export'sworkload_node_ids_share_ranked_prefix_across_topk_sizeschecks this.Notes
hll_confidence.rsfrom feat: separate physical planning from deployment and share DAG execution #462 is dropped. It duplicatesaccuracy/estimators/hll.rs, which feat: centralize estimator accuracy and source-driven HLL sizing #460 already merged, and nothing uses it.promql_to_post_asap's TopK reference test now only checks heap TopK candidates, because exact candidates are admitted too.Validation:
cargo test --workspace(1215 passed),cargo clippy --workspace --all-targets -D warnings.Split stack: this PR · #473 · #474 · #475. #462 is left open for reference.
🤖 Generated with Claude Code