Summary
L3 (L2→L3 converter) gap. A nested aggregate whose inner sum by (k) projects the schema down drops the label the OUTER aggregate groups on, so the outer by (...) fails to resolve.
Corpus impact
1 rejection. Error variant: LoweringError::Convert (column resolution).
Reproduction
sum(sum by (group)(http_requests{job="api-server"})) by (job)
L2→L3 conversion failed: column resolution failed:
column job not found in schema (have: ["group", "sum"])
Analysis
The inner sum by (group) yields a closed schema [group, sum], dropping job. The outer by (job) then can't resolve job — which is arguably semantically correct for PromQL (the inner sum does collapse job), so this may be WAI / clean-rejection rather than a lowering bug. Filing to make the decision explicit and pin it with a test either way.
Overlaps #27 (nested query functions) and #41 (aggregate output-schema derivation duplicated by hand) — the schema-threading path is shared. Cross-referencing rather than duplicating.
Summary
L3 (L2→L3 converter) gap. A nested aggregate whose inner
sum by (k)projects the schema down drops the label the OUTER aggregate groups on, so the outerby (...)fails to resolve.Corpus impact
1 rejection. Error variant:
LoweringError::Convert(column resolution).Reproduction
Analysis
The inner
sum by (group)yields a closed schema[group, sum], droppingjob. The outerby (job)then can't resolvejob— which is arguably semantically correct for PromQL (the inner sum does collapsejob), so this may be WAI / clean-rejection rather than a lowering bug. Filing to make the decision explicit and pin it with a test either way.Overlaps #27 (nested query functions) and #41 (aggregate output-schema derivation duplicated by hand) — the schema-threading path is shared. Cross-referencing rather than duplicating.