From 18a0caee430f338fe31ae2de57a936a10ecfcb99 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 12 May 2020 20:26:44 +0300 Subject: [PATCH] app/vmselect/promql: fix `any(..)` calculations - return all the data points instead of the first one --- app/vmselect/promql/aggr_incremental.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/vmselect/promql/aggr_incremental.go b/app/vmselect/promql/aggr_incremental.go index 6ff37efea..10ff4ccea 100644 --- a/app/vmselect/promql/aggr_incremental.go +++ b/app/vmselect/promql/aggr_incremental.go @@ -470,7 +470,9 @@ func updateAggrAny(iac *incrementalAggrContext, values []float64) { if dstCounts[0] > 0 { return } - dstCounts[0] = 1 + for i := range values { + dstCounts[i] = 1 + } dstValues = append(dstValues[:0], values...) }