fix: a problem of group by tbname

This commit is contained in:
Xiaoyu Wang 2022-07-02 11:31:35 +08:00
parent 2a114a6b83
commit 246b3e245d
1 changed files with 8 additions and 7 deletions

View File

@ -1529,17 +1529,18 @@ int32_t nodesCollectFuncs(SSelectStmt* pSelect, ESqlClause clause, FFuncClassifi
} }
*pFuncs = NULL; *pFuncs = NULL;
nodesWalkSelectStmt(pSelect, clause, collectFuncs, &cxt); nodesWalkSelectStmt(pSelect, clause, collectFuncs, &cxt);
if (TSDB_CODE_SUCCESS != cxt.errCode) { if (TSDB_CODE_SUCCESS == cxt.errCode) {
nodesDestroyList(cxt.pFuncs); if (LIST_LENGTH(cxt.pFuncs) > 0) {
return cxt.errCode; *pFuncs = cxt.pFuncs;
} } else {
if (LIST_LENGTH(cxt.pFuncs) > 0) { nodesDestroyList(cxt.pFuncs);
*pFuncs = cxt.pFuncs; }
} else { } else {
nodesDestroyList(cxt.pFuncs); nodesDestroyList(cxt.pFuncs);
} }
taosHashCleanup(cxt.pAliasName);
return TSDB_CODE_SUCCESS; return cxt.errCode;
} }
typedef struct SCollectSpecialNodesCxt { typedef struct SCollectSpecialNodesCxt {