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;
nodesWalkSelectStmt(pSelect, clause, collectFuncs, &cxt);
if (TSDB_CODE_SUCCESS != cxt.errCode) {
nodesDestroyList(cxt.pFuncs);
return cxt.errCode;
}
if (LIST_LENGTH(cxt.pFuncs) > 0) {
*pFuncs = cxt.pFuncs;
if (TSDB_CODE_SUCCESS == cxt.errCode) {
if (LIST_LENGTH(cxt.pFuncs) > 0) {
*pFuncs = cxt.pFuncs;
} else {
nodesDestroyList(cxt.pFuncs);
}
} else {
nodesDestroyList(cxt.pFuncs);
}
taosHashCleanup(cxt.pAliasName);
return TSDB_CODE_SUCCESS;
return cxt.errCode;
}
typedef struct SCollectSpecialNodesCxt {