From 344cce1a3b6564f1839cdc34d26af26946e441bf Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Wed, 10 Nov 2021 08:50:07 +0800 Subject: [PATCH] support pow(min(col), 2) --- src/client/src/tscSQLParser.c | 1 - src/common/inc/texpr.h | 2 +- src/common/src/texpr.c | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 12f72ba43f..9b519c7e4e 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -1886,7 +1886,6 @@ static int32_t handleAggregateExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_ pSqlExpr->param[0].nType = TSDB_DATA_TYPE_BINARY; // tbufCloseWriter(&bw); // TODO there is a memory leak - tExprTreeDestroy(pInfo->pExpr->pExpr, NULL); return TSDB_CODE_SUCCESS; } diff --git a/src/common/inc/texpr.h b/src/common/inc/texpr.h index 29e7df6a29..4aaff98b17 100644 --- a/src/common/inc/texpr.h +++ b/src/common/inc/texpr.h @@ -115,7 +115,7 @@ typedef struct tExprNode { struct { int16_t functionId; uint8_t numChildren; - struct tExprNode** pChildren; + struct tExprNode **pChildren; } _func; }; int16_t resultType; diff --git a/src/common/src/texpr.c b/src/common/src/texpr.c index 37244e208a..2176784aa3 100644 --- a/src/common/src/texpr.c +++ b/src/common/src/texpr.c @@ -956,6 +956,8 @@ tExprNode* exprdup(tExprNode* pNode) { } pCloned->nodeType = pNode->nodeType; + pCloned->resultType = pNode->resultType; + pCloned->resultBytes = pNode->resultBytes; return pCloned; } -- GitLab