From 1369fe19120ba5bacd345642b55f3d867ae80734 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Fri, 24 May 2024 18:56:30 +0530 Subject: [PATCH] fix: remove series with no points (#5077) --- pkg/query-service/postprocess/having.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/query-service/postprocess/having.go b/pkg/query-service/postprocess/having.go index a61aac3c9d..a37ba70379 100644 --- a/pkg/query-service/postprocess/having.go +++ b/pkg/query-service/postprocess/having.go @@ -23,6 +23,10 @@ func applyHavingClause(result []*v3.Result, queryRangeParams *v3.QueryRangeParam j-- } } + if len(result.Series[i].Points) == 0 { + result.Series = append(result.Series[:i], result.Series[i+1:]...) + i-- + } } } }