Merge pull request #18542 from taosdata/fix/3.0_bugfix_wxy
fix: planner error
This commit is contained in:
commit
10c8a60147
|
@ -580,15 +580,19 @@ static int32_t createAggLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect,
|
|||
}
|
||||
|
||||
// set the output
|
||||
if (TSDB_CODE_SUCCESS == code && NULL != pOutputGroupKeys) {
|
||||
code = createColumnByRewriteExprs(pOutputGroupKeys, &pAgg->node.pTargets);
|
||||
}
|
||||
nodesDestroyList(pOutputGroupKeys);
|
||||
|
||||
if (TSDB_CODE_SUCCESS == code && NULL != pAgg->pAggFuncs) {
|
||||
code = createColumnByRewriteExprs(pAgg->pAggFuncs, &pAgg->node.pTargets);
|
||||
}
|
||||
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
if (NULL != pOutputGroupKeys) {
|
||||
code = createColumnByRewriteExprs(pOutputGroupKeys, &pAgg->node.pTargets);
|
||||
} else if (NULL == pAgg->node.pTargets && NULL != pAgg->pGroupKeys) {
|
||||
code = createColumnByRewriteExprs(pAgg->pGroupKeys, &pAgg->node.pTargets);
|
||||
}
|
||||
}
|
||||
nodesDestroyList(pOutputGroupKeys);
|
||||
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
*pLogicNode = (SLogicNode*)pAgg;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue