Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ReadPopulation Sum/Count/Average/Quantile now compile to a grouped aggregate over the population snapshot, so deployments no longer evaluate these readouts in their current-series store. Quantile uses a new exact Reduction::Quantile with PromQL rank interpolation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A query-time Binary with a PromQL scalar-literal operand folds the literal into a projection, which also covers unary negation. Two grouped row inputs match one-to-one on equal label columns through an inner equi-join before the operator is applied. Comparisons and per-series rows still fail at compile time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exact count readout yields Int64, but PromQL declares a Float64 sample, so compile rejected count finalization. Convert exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A global population aggregate with no members emitted one row; PromQL returns an empty vector. Quantile now orders NaN samples first, as Prometheus does. Found in independent review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
split/462-f-physical-planner
branch
from
September 30, 2026 18:26
bb1abdd to
0ced125
Compare
zzylol
force-pushed
the
feat/physical-compile-coverage
branch
from
September 30, 2026 18:27
05d0ecb to
f9d8a3a
Compare
zzylol
changed the base branch from
split/462-f-physical-planner
to
feat/population-lifecycle
September 30, 2026 18:28
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.
Stacked on #491.
Rebuilt into the linear stack on main. New
integrate:commit(s) fold in integration-branch resolutions this PR needs on top of the earlier stack: "let coverage lowering chains use per-node helper indices".Why
ASAPQuery-backend still lowers and evaluates much of its computation itself. It rebuilds PromQL operators from query text (
query_time.rs,physical_values.rs), computes current-series readouts in its store, and assembles value graphs by hand. In the agreed layering, the Planner physical compile (physical_planner::compile) owns all computation. The backend owns ingestion, storage, readout I/O, external exact engines, and scheduling.What
docs/develop_docs/physical-compile-coverage.mdmaps 31 backend computation sites to Planner payloads and marks their status at feat: compile Planner selections into physical DAG candidates #475: 11 supported, 4 partial, 14 missing, 2 backend-owned.ReadPopulationSum / Count / Average / Quantile now compile to grouped aggregation. A new exactReduction::Quantileuses PromQL interpolation and puts NaN first. Global readouts of an empty population return an empty vector.Binaryover logical value rows:x * 2,100 - x, and-x.compilerejected it.After this PR the inventory reads 17 supported, 4 partial, 8 missing, 2 backend-owned.
Before / After
Each case below goes PromQL → Planner selection →
compile_post_asap_dag→compile, with raw scans as the only inputs:sum by (job) (m)(maintained population)native population readout does not support this operation{api: 10, db: 5}quantile by (job) (0.25, m){api: 1.5, db: 5}sum by (job) (sum_over_time(m[5m])) * 2node 3: native Planner binding currently requires a unary operation{api: 28, db: 10}sum by (job) (sum_over_time(a[5m])) / sum by (job) (sum_over_time(b[5m]))vector binary requires Float64 scalars or complete label-map vectors{api: 3, db: +Inf}(unmatched groups dropped)sum by (job) (count_over_time(m[5m]))node 2: native output type differs from Planner output{api: 4, db: 1}These cases are the tests in
crates/asap-physical-operators/tests/deployment_computation.rs. Each test was confirmed to fail on the base branch.Remaining
The coverage doc lists the rest in priority order:
Fallbacksubtrees: range functions over matrices,scalar(),histogram_quantile, subquery gridsboolcomparisons (needsreturn_boolinBinary)EntityIdentityprecompute updatesValidation
cargo fmt --all --check: cleancargo clippy --workspace --all-targets -- -D warnings: cleancargo test --workspace --no-fail-fast: 1363 passed, 0 failed.dag_export::workload_node_ids_make_smaller_topk_reuse_explicitdoes not exist on this base.🤖 Generated with Claude Code