diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 1f641410d9..446b29d7f2 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -2170,9 +2170,6 @@ int32_t nodesCollectSelectFuncs(SSelectStmt* pSelect, ESqlClause clause, char* t .classifier = classifier, .tableAlias = tableAlias, .pFuncs = pFuncs}; - if (NULL == cxt.pFuncs) { - return TSDB_CODE_OUT_OF_MEMORY; - } nodesWalkSelectStmt(pSelect, clause, collectFuncs, &cxt); return cxt.errCode; @@ -2197,11 +2194,9 @@ int32_t nodesCollectFuncs(SSelectStmt* pSelect, ESqlClause clause, char* tableAl *pFuncs = cxt.pFuncs; } else { nodesDestroyList(cxt.pFuncs); - *pFuncs = NULL; } } else { nodesDestroyList(cxt.pFuncs); - *pFuncs = NULL; } return cxt.errCode; diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 988c2442e0..b14efcd40b 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -4526,7 +4526,7 @@ static EDealRes replaceOrderByAliasImpl(SNode** pNode, void* pContext) { SReplaceOrderByAliasCxt* pCxt = pContext; SNodeList* pProjectionList = pCxt->pProjectionList; SNode* pProject = NULL; - if (QUERY_NODE_COLUMN == nodeType(*pNode) || QUERY_NODE_FUNCTION == nodeType(*pNode)) { + if (QUERY_NODE_COLUMN == nodeType(*pNode)) { FOREACH(pProject, pProjectionList) { SExprNode* pExpr = (SExprNode*)pProject; if (0 == strcmp(((SColumnRefNode*)*pNode)->colName, pExpr->userAlias)