Open
Labels
bugSomething isn't workingSomething isn't workingpromqlPromQL front-end lowering (L1→L2)PromQL front-end lowering (L1→L2)
Description
Problem, by example
The topk series-identity fix (#794) made grouped topk answer whole series. While reviewing it, three nested topk forms were found to fail. They fail the same way before and after that fix:
| Query | Result |
|---|---|
sum by (region) (topk(2, sum_over_time(data[1m]))) |
Stage 3 fails with NoValidCandidate([]) |
topk(2, sum_over_time(data[1m])) * 2 |
the frontend fails before Stage 2: "vector has no numeric sample" |
count(bottomk(2, sum_over_time(data[1m]))) |
executes, but the answer is not a Float64 value |
Prometheus answers all three: a sum of the top two series per region; each top series doubled; and the number of selected series.
Expected
All three plan and execute. Each answer equals Prometheus's.
Acceptance
An end-to-end test runs each query over a few series, checks the answer against hand-computed values, and checks it equals query_time_reference.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpromqlPromQL front-end lowering (L1→L2)PromQL front-end lowering (L1→L2)
Activity