Skip to content

PromQL: agg intents should carry an explicit col, not implicit None for the value column #130

Open

Description

@milindsrivastava1997

`AggIntent::{Sum,Avg,Quantile,Cardinality,...}.col` is `Option`. SQL uses it literally — `Some(idx)` names the reduced column, `None` means no column applies (e.g. `COUNT(*)`). PromQL instead always emits `col: None` to mean "the implicit sample value column" (`crates/l2/src/lower.rs:835`), a documented convention rather than something the field states.

This overloads `None` with two different meanings depending on source language, so `AggIntent` alone doesn't tell you which case you're in — a reader has to know the per-language convention.

Activity

  1. added
    enhancement
    promql
    ir
    schema
    on Aug 26, 2026
  2. zzylol commented on Aug 26, 2026

    @zzylol
    Contributor

    Related open work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementirpromqlschema

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions