提交 8460171c 编写于 作者: G Ganlin Zhao

fix(query): fix count/hyperloglog return additional row in group by

when queryPolicy is set to 3.
上级 24b2ee0f
......@@ -1546,6 +1546,10 @@ static int32_t partTagsOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSub
if (TSDB_CODE_SUCCESS == code) {
NODES_CLEAR_LIST(pNode->pChildren);
nodesDestroyNode((SNode*)pNode);
if (QUERY_NODE_LOGIC_PLAN_AGG == pNode->pParent->type) {
SAggLogicNode* pParent = (SAggLogicNode*)(pNode->pParent);
pParent->hasGroupKeyOptimized = true;
}
}
} else {
SAggLogicNode* pAgg = (SAggLogicNode*)pNode;
......@@ -1578,6 +1582,7 @@ static int32_t partTagsOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSub
if (TSDB_CODE_SUCCESS == code) {
code = partTagsOptRebuildTbanme(pScan->pGroupTags);
}
pCxt->optimized = true;
return code;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册