From c7dc65b70fb58114cf655a122cfd2caf0ed6b91e Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 27 Dec 2021 15:37:58 +0800 Subject: [PATCH] [TD-11983](query): elapsed function second param time_unit should not contain now keyword --- src/client/src/tscSQLParser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 8f88a89af6..12ebd62e93 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -2852,7 +2852,7 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col char val[8] = {0}; int64_t tickPerSec = 0; - if (pParamElem[1].pNode->exprToken.type == TK_NOW) { + if (pParamElem[1].pNode->exprToken.type == TK_NOW || strstr(pParamElem[1].pNode->exprToken.z, "now")) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2); } -- GitLab