From a67d064418b8ba1470d5d1c17bed9a4f1ab86cf0 Mon Sep 17 00:00:00 2001 From: Nityananda Gohain Date: Thu, 8 Jun 2023 12:26:59 +0530 Subject: [PATCH] fix: if condition corrected in aggreagte attribute static fields (#2866) --- pkg/query-service/app/clickhouseReader/reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/query-service/app/clickhouseReader/reader.go b/pkg/query-service/app/clickhouseReader/reader.go index b12d3bbd9e..50e54f40d7 100644 --- a/pkg/query-service/app/clickhouseReader/reader.go +++ b/pkg/query-service/app/clickhouseReader/reader.go @@ -3879,7 +3879,7 @@ func (r *ClickHouseReader) GetLogAggregateAttributes(ctx context.Context, req *v } // add other attributes for _, field := range constants.StaticFieldsLogsV3 { - if !stringAllowed && field.DataType == v3.AttributeKeyDataTypeString && (v3.AttributeKey{} == field) { + if (!stringAllowed && field.DataType == v3.AttributeKeyDataTypeString) || (v3.AttributeKey{} == field) { continue } else if len(req.SearchText) == 0 || strings.Contains(field.Key, req.SearchText) { response.AttributeKeys = append(response.AttributeKeys, field)