enh: last cache optimize
This commit is contained in:
parent
cf245fa520
commit
906fafc578
|
@ -560,13 +560,9 @@ static int32_t createAggLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect,
|
|||
}
|
||||
|
||||
if (NULL != pSelect->pGroupByList) {
|
||||
if (NULL != pAgg->pGroupKeys) {
|
||||
code = nodesListStrictAppendList(pAgg->pGroupKeys, nodesCloneList(pSelect->pGroupByList));
|
||||
} else {
|
||||
pAgg->pGroupKeys = nodesCloneList(pSelect->pGroupByList);
|
||||
if (NULL == pAgg->pGroupKeys) {
|
||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
pAgg->pGroupKeys = nodesCloneList(pSelect->pGroupByList);
|
||||
if (NULL == pAgg->pGroupKeys) {
|
||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -587,6 +583,8 @@ static int32_t createAggLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect,
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue