Skip to content

Query-time aggregations error on NaN/Inf instead of propagating them like Prometheus #857

Open

Description

@milindsrivastava1997

Problem

aggregate_values in asap-query-engine/src/engines/query_time_aggregation.rs returns Err("query-time aggregations cannot process non-finite values") when any input value is NaN or ±Inf. It also errors when the result is non-finite. Prometheus instead propagates them: sum of a NaN is NaN, and max/min follow Prometheus's NaN rules.

As a result, one NaN or Inf sample in any group fails the whole query, whereas the same query without a query-time stage returns NaN/Inf. Two paths reach this:

Fix direction

Make each query-time operator follow Prometheus's NaN/Inf semantics instead of erroring. Then add tests comparing against the same query served without a stage.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions