You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Nested histogram_quantile and histogram_quantiles still get no plan (executor compile) #911
Once the top-level classic histogram_quantile compiles (#890), two related shapes still get no plan:
stage_pipeline --promql 'sum(histogram_quantile(0.9, sum by (le, job) (rate(http_request_duration_seconds_bucket[5m]))))' \
--series-count 100 --enforce-accuracy-guarantees --out nested.json
stage_pipeline --promql 'histogram_quantiles(sum by (le) (rate(http_request_duration_seconds_bucket[5m])), "phi", 0.5, 0.9)' \
--series-count 100 --enforce-accuracy-guarantees --out multi.json
Observed, from the review run of the #890 fix branch: stage3_plan_selection.selected is null and every candidate is rejected as executor_cannot_compile. The reasons are:
Query
Rejection reason
sum(histogram_quantile(…)), max by (job) (histogram_quantile(…))
summary update column missing or ambiguous
histogram_quantiles(…, "phi", 0.5, 0.9)
value operation has no native implementation
Expected: an exact plan that answers as Prometheus does. For the first query, that is the sum of the per-job p90s. For the second, it is one series per φ, with phi="0.5" and phi="0.9".
Why it happens
Nested aggregation. The quantile's output value column is named histogram_quantile, but the outer Aggregate resolves its value with named_column(input, &ColumnRef::SampleValue) in crates/executor/src/physical_planner/mod.rs, which looks for a column named value. A plain nested sum(sum by (job) (…)) has the same first-candidate rejection, but another of its candidates compiles. The histogram form has no other candidate.
histogram_quantiles. It lowers to a Concat of PromqlRelabel-wrapped branches. bind_operation has no case for that relabel/concat node.
docs/develop_docs/physical-compile-coverage.md stated that both shapes were covered. That was true only under the removed legacy execution wrapper.
Scope and acceptance
In scope: compile both shapes to exact operators.
Regression tests: plan_installable plus executor runs on controlled bucket counters, compared with hand-computed Prometheus values.
Activity
executor: compile classic-bucket histogram_quantile so it gets an exa…