diff options
Diffstat (limited to 'src/backend/executor/nodeWindowAgg.c')
-rw-r--r-- | src/backend/executor/nodeWindowAgg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c index a06790d94a1..bf0c98d8783 100644 --- a/src/backend/executor/nodeWindowAgg.c +++ b/src/backend/executor/nodeWindowAgg.c @@ -2057,6 +2057,7 @@ ExecEndWindowAgg(WindowAggState *node) void ExecReScanWindowAgg(WindowAggState *node) { + PlanState *outerPlan = outerPlanState(node); ExprContext *econtext = node->ss.ps.ps_ExprContext; node->all_done = false; @@ -2082,8 +2083,8 @@ ExecReScanWindowAgg(WindowAggState *node) * if chgParam of subnode is not null then plan will be re-scanned by * first ExecProcNode. */ - if (node->ss.ps.lefttree->chgParam == NULL) - ExecReScan(node->ss.ps.lefttree); + if (outerPlan->chgParam == NULL) + ExecReScan(outerPlan); } /* |