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
    enhancementNew feature or request
    promqlPromQL front-end lowering (L1→L2)
    irPre-ASAP or post-ASAP intermediate representation
    schemaSchema, type, key, and nullability contracts
    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

    enhancementNew feature or requestirPre-ASAP or post-ASAP intermediate representationpromqlPromQL front-end lowering (L1→L2)schemaSchema, type, key, and nullability contracts

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions