fix a bug about ROWNUM in partition table

This commit is contained in:
zhouxiongjia
2021-07-30 17:32:21 +08:00
parent 3eaf5e5066
commit f46710c718

View File

@ -141,9 +141,11 @@ TupleTableSlot* ExecPartIterator(PartIteratorState* node)
if (!TupIsNull(slot))
return slot;
node->ps.lefttree->ps_rownum--;
/* switch to next partition until we get a unempty tuple */
for (;;) {
/* minus wrong rownum */
node->ps.lefttree->ps_rownum--;
if (node->currentItr + 1 >= partitionScan) /* have scanned all partitions */
return NULL;