From: Vallimaharajan Date: Wed, 13 Nov 2024 20:26:00 +0530 Subject: [PATCH] Skip partition immediately after run condition failure in WINDOWAGG_PASSTHROUGH_STRICT mode --- src/backend/executor/nodeWindowAgg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c index 51a6708a39..ec13a9e030 100644 --- a/src/backend/executor/nodeWindowAgg.c +++ b/src/backend/executor/nodeWindowAgg.c @@ -2206,9 +2206,11 @@ ExecWindowAgg(PlanState *pstate) */ spool_tuples(winstate, winstate->currentpos); - /* Move to the next partition if we reached the end of this partition */ + /* Move to the next partition if we reached the end of this partition or + * if we are in STRICT pass-through mode */ if (winstate->partition_spooled && - winstate->currentpos >= winstate->spooled_rows) + (winstate->currentpos >= winstate->spooled_rows || + winstate->status == WINDOWAGG_PASSTHROUGH_STRICT)) { release_partition(winstate); -- 2.34.1 ------=_Part_6447_1211805977.1731511331918 Content-Type: application/octet-stream; name=windowagg_fix2.patch Content-Transfer-Encoding: 7bit X-ZM_AttachId: 139508041319270000 Content-Disposition: attachment; filename=windowagg_fix2.patch