fix tsma stream same tbname with same group id

This commit is contained in:
wangjiaming0909 2024-10-29 17:43:43 +08:00
parent 413cf3e504
commit fc39ea70ac
1 changed files with 5 additions and 10 deletions

View File

@ -1083,18 +1083,13 @@ void cleanupBasicInfo(SOptrBasicInfo* pInfo) {
bool groupbyTbname(SNodeList* pGroupList) { bool groupbyTbname(SNodeList* pGroupList) {
bool bytbname = false; bool bytbname = false;
if (LIST_LENGTH(pGroupList) == 1) { SNode*pNode = NULL;
SNode* p = nodesListGetNode(pGroupList, 0); FOREACH(pNode, pGroupList) {
if (!p) { if (pNode->type == QUERY_NODE_FUNCTION) {
qError("%s failed at line %d since %s", __func__, __LINE__, tstrerror(terrno)); bytbname = (strcmp(((struct SFunctionNode*)pNode)->functionName, "tbname") == 0);
return false; break;
}
if (p->type == QUERY_NODE_FUNCTION) {
// partition by tbname/group by tbname
bytbname = (strcmp(((struct SFunctionNode*)p)->functionName, "tbname") == 0);
} }
} }
return bytbname; return bytbname;
} }