From 1b597198911eb7396432e3dcd9d84c6bce101187 Mon Sep 17 00:00:00 2001 From: Nityananda Gohain Date: Mon, 16 Sep 2024 16:35:47 +0530 Subject: [PATCH] Fix/iscolumn (#5983) * fix: fix isColumn method to rely on column instead of index * fix: add the space for explicit check --- pkg/query-service/app/clickhouseReader/reader.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/query-service/app/clickhouseReader/reader.go b/pkg/query-service/app/clickhouseReader/reader.go index 946f0e213d..5f34a2f9dc 100644 --- a/pkg/query-service/app/clickhouseReader/reader.go +++ b/pkg/query-service/app/clickhouseReader/reader.go @@ -3971,7 +3971,8 @@ func isColumn(useLogsNewSchema bool, tableStatement, attrType, field, datType st // value of attrType will be `resource` or `tag`, if `tag` change it to `attribute` var name string if useLogsNewSchema { - name = utils.GetClickhouseColumnNameV2(attrType, datType, field) + // adding explict '`' + name = fmt.Sprintf("`%s`", utils.GetClickhouseColumnNameV2(attrType, datType, field)) } else { name = utils.GetClickhouseColumnName(attrType, datType, field) }