fix(query): fix count/hyperloglog return additional row in group by
when queryPolicy is set to 3.
This commit is contained in:
parent
24b2ee0fff
commit
8460171cb6
|
@ -1546,6 +1546,10 @@ static int32_t partTagsOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSub
|
||||||
if (TSDB_CODE_SUCCESS == code) {
|
if (TSDB_CODE_SUCCESS == code) {
|
||||||
NODES_CLEAR_LIST(pNode->pChildren);
|
NODES_CLEAR_LIST(pNode->pChildren);
|
||||||
nodesDestroyNode((SNode*)pNode);
|
nodesDestroyNode((SNode*)pNode);
|
||||||
|
if (QUERY_NODE_LOGIC_PLAN_AGG == pNode->pParent->type) {
|
||||||
|
SAggLogicNode* pParent = (SAggLogicNode*)(pNode->pParent);
|
||||||
|
pParent->hasGroupKeyOptimized = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SAggLogicNode* pAgg = (SAggLogicNode*)pNode;
|
SAggLogicNode* pAgg = (SAggLogicNode*)pNode;
|
||||||
|
@ -1578,6 +1582,7 @@ static int32_t partTagsOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSub
|
||||||
if (TSDB_CODE_SUCCESS == code) {
|
if (TSDB_CODE_SUCCESS == code) {
|
||||||
code = partTagsOptRebuildTbanme(pScan->pGroupTags);
|
code = partTagsOptRebuildTbanme(pScan->pGroupTags);
|
||||||
}
|
}
|
||||||
|
|
||||||
pCxt->optimized = true;
|
pCxt->optimized = true;
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue