Severity: LOW — wrong dtype metadata
Found in a whole-repo code review. The output value column of count_over_time(...) is typed Int64, while every other per-series range reducer yields Float64.
Location
crates/ir/src/intent_algebra/query_expr.rs:644 (per_series_reduction_schema) + crates/ir/src/intent_algebra/agg_intent.rs:183 (AggIntent::Count::output_column → Int64)
Root cause
per_series_reduction_schema calls agg.output_column(input_value_col) and overrides only the column name to "value", keeping the dtype. For count_over_time the agg is Count, whose output_column returns Int64. Rate/Increase/Sum/Delta/Quantile/… all end up Float64, so only count_over_time is off.
Reproduction (verified)
count_over_time(m[5m]) → Aggregate{ by:[], [Count], TimeRange{Scan} } whose derived output value column is Int64. PromQL sample values are always float64, so a downstream float consumer sees a wrong dtype for this one function.
Proposed fix
In per_series_reduction_schema, force out.dtype = DataType::Float64 alongside the name override — a per-series range reduction in PromQL always produces the float sample value, so this is correct for every reducer (and fixes count_over_time).
Severity: LOW — wrong dtype metadata
Found in a whole-repo code review. The output value column of
count_over_time(...)is typedInt64, while every other per-series range reducer yieldsFloat64.Location
crates/ir/src/intent_algebra/query_expr.rs:644(per_series_reduction_schema) +crates/ir/src/intent_algebra/agg_intent.rs:183(AggIntent::Count::output_column→Int64)Root cause
per_series_reduction_schemacallsagg.output_column(input_value_col)and overrides only the column name to"value", keeping the dtype. Forcount_over_timethe agg isCount, whoseoutput_columnreturnsInt64.Rate/Increase/Sum/Delta/Quantile/… all end upFloat64, so onlycount_over_timeis off.Reproduction (verified)
count_over_time(m[5m])→Aggregate{ by:[], [Count], TimeRange{Scan} }whose derived outputvaluecolumn isInt64. PromQL sample values are alwaysfloat64, so a downstream float consumer sees a wrong dtype for this one function.Proposed fix
In
per_series_reduction_schema, forceout.dtype = DataType::Float64alongside the name override — a per-series range reduction in PromQL always produces the float sample value, so this is correct for every reducer (and fixescount_over_time).