From 285c4deccd95db5eb14e864b42c8c964b9a5f2a9 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 13 Dec 2021 11:23:16 +0800 Subject: [PATCH] [TD-11970]: support timestamp arithmatic operation on timestamp tags --- src/query/src/qSqlParser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/query/src/qSqlParser.c b/src/query/src/qSqlParser.c index 64f8eb05d2..2c9b302190 100644 --- a/src/query/src/qSqlParser.c +++ b/src/query/src/qSqlParser.c @@ -143,14 +143,14 @@ tSqlExpr *tSqlExprCreateIdValue(SSqlInfo* pInfo, SStrToken *pToken, int32_t optr if (optrType == TK_NULL) { if (pToken){ pToken->type = TSDB_DATA_TYPE_NULL; - tVariantCreate(&pSqlExpr->value, pToken, true); + tVariantCreate(&pSqlExpr->value, pToken); } pSqlExpr->tokenId = optrType; pSqlExpr->type = SQL_NODE_VALUE; } else if (optrType == TK_INTEGER || optrType == TK_STRING || optrType == TK_FLOAT || optrType == TK_BOOL) { if (pToken) { toTSDBType(pToken->type); - tVariantCreate(&pSqlExpr->value, pToken, true); + tVariantCreate(&pSqlExpr->value, pToken); } pSqlExpr->tokenId = optrType; pSqlExpr->type = SQL_NODE_VALUE; @@ -203,7 +203,7 @@ tSqlExpr *tSqlExprCreateTimestamp(SStrToken *pToken, int32_t optrType) { if (optrType == TK_INTEGER || optrType == TK_STRING) { if (pToken) { toTSDBType(pToken->type); - tVariantCreate(&pSqlExpr->value, pToken, true); + tVariantCreate(&pSqlExpr->value, pToken); } pSqlExpr->tokenId = optrType; pSqlExpr->type = SQL_NODE_VALUE; @@ -572,7 +572,7 @@ SArray *tVariantListAppendToken(SArray *pList, SStrToken *pToken, uint8_t order, if (pToken) { tVariantListItem item; - tVariantCreate(&item.pVar, pToken, needRmquoteEscape); + tVariantCreateExt(&item.pVar, pToken, TK_ID, needRmquoteEscape); item.sortOrder = order; taosArrayPush(pList, &item); -- GitLab