forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit94985c2
committed
Add subquery pullup handling for WindowClause runCondition
9d9c02c added code to allow WindowAgg to take some shortcuts when amonotonic WindowFunc reached some value that it could never come backfrom due to the function's monotonic nature. That commit added arunCondition field to WindowClause to store the condition which, when itbecomes false we can start taking shortcuts in nodeWindowAgg.c.Here we fix an issue where subquery pullups didn't properly update therunCondition to update the Vars to properly reference the new query level.Here we also add a missing call to preprocess_expression() for theWindowClause's runCondtion. The WindowFuncs in the targetlist will havehad this process done, so we must also do it for the WindowFuncs in therunCondition so that they can be correctly found in the targetlistduring setrefs.cBug: #17709Reported-by: Alexey MakhmutovAuthor: Richard Guo, David RowleyDiscussion:https://postgr.es/m/17709-4f557160e3e8ee9a@postgresql.orgBackpatch-through: 15, where9d9c02c was introduced1 parent66dcb09 commit94985c2
2 files changed
+12
-0
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
833 | 833 |
| |
834 | 834 |
| |
835 | 835 |
| |
| 836 | + | |
| 837 | + | |
| 838 | + | |
836 | 839 |
| |
837 | 840 |
| |
838 | 841 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2120 | 2120 |
| |
2121 | 2121 |
| |
2122 | 2122 |
| |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
2123 | 2132 |
| |
2124 | 2133 |
| |
2125 | 2134 |
| |
|
0 commit comments
Comments
(0)