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
Nested topk/bottomk forms fail to plan or execute #796
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.
Activity