fix two bugs about ROWNUM:

1. ROWNUM behaves incorrect in the partition table
2. if there is aggregate function, ROWNUM can not be rewrite to LIMIT
This commit is contained in:
zhouxiongjia
2021-06-15 20:52:44 +08:00
parent 378be4707c
commit b62cc145a0
4 changed files with 7 additions and 4 deletions

View File

@ -270,7 +270,9 @@ void ExecReScan(PlanState* node)
}
/* reset the rownum */
node->ps_rownum = 0;
if (!node->do_not_reset_rownum) {
node->ps_rownum = 0;
}
/*
* If we have changed parameters, propagate that info.