fix: select last(*) ..group by tag return wrong rows of data

This commit is contained in:
wangjiaming0909 2023-05-19 16:50:27 +08:00
parent 8eacc51ade
commit 3dbbe63092
1 changed files with 1 additions and 1 deletions

View File

@ -2377,7 +2377,7 @@ static int32_t lastRowScanOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogic
if (NULL != cxt.pLastCols) {
cxt.doAgg = false;
lastRowScanOptSetLastTargets(pScan->pScanCols, cxt.pLastCols);
NODES_DESTORY_LIST(pScan->pScanPseudoCols);
nodesWalkExprs(pScan->pScanPseudoCols, lastRowScanOptSetColDataType, &cxt);
lastRowScanOptSetLastTargets(pScan->node.pTargets, cxt.pLastCols);
nodesClearList(cxt.pLastCols);
}