From e39296f899983c1de185c2b2fac440aaae3bb430 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 22 Feb 2022 17:29:52 +0800 Subject: [PATCH] "[TD-11220](query): time related functions" --- src/common/src/texpr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/src/texpr.c b/src/common/src/texpr.c index e395945521..60ed368418 100644 --- a/src/common/src/texpr.c +++ b/src/common/src/texpr.c @@ -1457,7 +1457,8 @@ int32_t exprValidateTimeNode(char *msgbuf, tExprNode *pExpr) { } //time unit - if (child1->nodeType != TSQL_NODE_VALUE && + if (child1->nodeType != TSQL_NODE_VALUE || + child1->resultType != TSDB_DATA_TYPE_TIMESTAMP || child1->pVal->nType != TSDB_DATA_TYPE_TIMESTAMP) { return TSDB_CODE_TSC_INVALID_OPERATION; } -- GitLab