mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
promql: fix incorrect "native histogram ignored in aggregation" annotations (#15414)
Signed-off-by: Charles Korn <charles.korn@grafana.com>
This commit is contained in:
parent
101b1c307f
commit
45db23617a
|
@ -3059,7 +3059,7 @@ func (ev *evaluator) aggregation(e *parser.AggregateExpr, q float64, inputMatrix
|
|||
|
||||
case parser.MAX:
|
||||
if h != nil {
|
||||
annos.Add(annotations.NewHistogramIgnoredInAggregationInfo("min", e.Expr.PositionRange()))
|
||||
annos.Add(annotations.NewHistogramIgnoredInAggregationInfo("max", e.Expr.PositionRange()))
|
||||
continue
|
||||
}
|
||||
if group.floatValue < f || math.IsNaN(group.floatValue) {
|
||||
|
@ -3068,7 +3068,7 @@ func (ev *evaluator) aggregation(e *parser.AggregateExpr, q float64, inputMatrix
|
|||
|
||||
case parser.MIN:
|
||||
if h != nil {
|
||||
annos.Add(annotations.NewHistogramIgnoredInAggregationInfo("max", e.Expr.PositionRange()))
|
||||
annos.Add(annotations.NewHistogramIgnoredInAggregationInfo("min", e.Expr.PositionRange()))
|
||||
continue
|
||||
}
|
||||
if group.floatValue > f || math.IsNaN(group.floatValue) {
|
||||
|
@ -3084,6 +3084,7 @@ func (ev *evaluator) aggregation(e *parser.AggregateExpr, q float64, inputMatrix
|
|||
delta := f - group.floatMean
|
||||
group.floatMean += delta / group.groupCount
|
||||
group.floatValue += delta * (f - group.floatMean)
|
||||
} else {
|
||||
if op == parser.STDVAR {
|
||||
annos.Add(annotations.NewHistogramIgnoredInAggregationInfo("stdvar", e.Expr.PositionRange()))
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue