From bcf841b652633089fec36eae30530f47cb2bf6bd Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 1 Mar 2022 16:05:19 +0800 Subject: [PATCH] fix CI --- src/client/src/tscSQLParser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index c53d55cc4d..b9f9b0cfe0 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -5075,10 +5075,10 @@ static int32_t validateSQLExprItem(SSqlCmd* pCmd, tSqlExpr* pExpr, return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg3); } - //now allowing now +/- value in select expr - //if (pExpr->tokenId == TK_TIMESTAMP) { - // return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg3); - //} + //not allowing now/today keyword arithmetic operation in select expr + if (pExpr->exprToken.type == TK_NOW || pExpr->exprToken.type == TK_TODAY) { + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg3); + } if (pExpr->type == SQL_NODE_VALUE) { *type = SQLEXPR_TYPE_VALUE; -- GitLab