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
PromQL: topk with 'by' clause over bare instant vector fails with column resolution error #22
topk by (label) (k, metric) applied to a bare instant vector fails at L2→L3 conversion with a column resolution error. Related to the Aggregate(Sum) wrapping bug in bare instant vectors.
Reproduction
# P8 — topk with by, instant vector
topk by (service) (5, http_requests_total)
Error:
ERR: L2→L3 conversion failed: column resolution failed:
ColumnRef::SampleValue has no `value` column in schema (have: ["service", "sum"])
Context
topk(5, http_requests_total) (without by) produces Aggregate(Sum) instead of a plain scan. When by is added the sum aggregate's output schema no longer contains a value column, breaking SampleValue resolution.
The service label is preserved and routed to Sort.partition_by (no implicit Sum collapsing it). Reproduced via cargo run -p asap-control-lower --example topk_ir. Closing.
Activity
zzylol commentedon Jul 2, 2026
Verified fixed on latest
main(via PR #31).topk by (service) (5, http_requests_total)(P8) now lowers cleanly — no column-resolution error:The
servicelabel is preserved and routed toSort.partition_by(no implicitSumcollapsing it). Reproduced viacargo run -p asap-control-lower --example topk_ir. Closing.