Merge pull request #21388 from wangjiaming0909/fix/TS-3423
fix: select last(*) ..group by tag return wrong rows of data
This commit is contained in:
commit
e7496d7b82
|
@ -2374,7 +2374,7 @@ static int32_t lastRowScanOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogic
|
||||||
if (NULL != cxt.pLastCols) {
|
if (NULL != cxt.pLastCols) {
|
||||||
cxt.doAgg = false;
|
cxt.doAgg = false;
|
||||||
lastRowScanOptSetLastTargets(pScan->pScanCols, cxt.pLastCols);
|
lastRowScanOptSetLastTargets(pScan->pScanCols, cxt.pLastCols);
|
||||||
NODES_DESTORY_LIST(pScan->pScanPseudoCols);
|
nodesWalkExprs(pScan->pScanPseudoCols, lastRowScanOptSetColDataType, &cxt);
|
||||||
lastRowScanOptSetLastTargets(pScan->node.pTargets, cxt.pLastCols);
|
lastRowScanOptSetLastTargets(pScan->node.pTargets, cxt.pLastCols);
|
||||||
nodesClearList(cxt.pLastCols);
|
nodesClearList(cxt.pLastCols);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue