Skip to content

fix: PromQL stddev/stdvar should lower to population=true #16

Description

@milindsrivastava1997

PromQL defines stddev, stdvar, stddev_over_time, and stdvar_over_time as population statistics (divide by N).

The current lowering in crates/lower/src/promql.rs maps all four to population: false (sample stddev, divide by N-1):

InnerFunc::StdDev => AggFunc::StdDev { population: false },
InnerFunc::Variance => AggFunc::Variance { population: false },
// and outer_func maps the same way

These should be population: true. The e2e tests in tier2_agg.rs and tier3_range.rs currently assert population: false to match the lowering — they should be updated to population: true once this is fixed.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions