Skip to content

SQL: compatible_agg_types(Sum) omits CountMinSketch, the type the planner emits for approximate SUM #530

Description

@milindsrivastava1997

Scope: streaming_engine=precompute, SQL.

The planner emits AggregationType::CountMinSketch for approximate SQL SUM (asap-planner-rs/src/planner/sql.rs:201-206promql_utilities/src/query_logics/logics.rs:36-47).

The engine's capability-matching type filter for Statistic::Sum (asap_types/src/capability_matching.rs:21) only lists [Sum, MultipleSum]CountMinSketch is missing (contrast with Statistic::Count at line 22-25, which does include it).

Result: a SUM query can never resolve via capability-matching regardless of label/window match, because its aggregation type is rejected by the type filter before any structural comparison happens.

Repro: find_compatible_aggregation with a CountMinSketch(sub_type="sum") config and matching Statistic::Sum requirement → None. Reproduced end-to-end via a plain SELECT SUM(cpu_usage) ... GROUP BY datacenter query too.

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