0002-Initialize-NFA-per-partition-counters-in-ExecInitWindowAgg.txt

text/plain

Filename: 0002-Initialize-NFA-per-partition-counters-in-ExecInitWindowAgg.txt
Type: text/plain
Part: 1
Message: Re: Row pattern recognition
From d06525db781c3432d488706759c653d00a5e1980 Mon Sep 17 00:00:00 2001
From: Henson Choi <assam258@gmail.com>
Date: Thu, 5 Feb 2026 09:41:03 +0900
Subject: [PATCH 1/1] Initialize NFA per-partition counters in
 ExecInitWindowAgg

---
 src/backend/executor/nodeWindowAgg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c
index 1176df04b2c..1e088615d19 100644
--- a/src/backend/executor/nodeWindowAgg.c
+++ b/src/backend/executor/nodeWindowAgg.c
@@ -3054,6 +3054,8 @@ ExecInitWindowAgg(WindowAgg *node, EState *estate, int eflags)
 	winstate->nfaContextFree = NULL;
 	winstate->nfaStateFree = NULL;
 	winstate->nfaLastProcessedRow = -1;
+	winstate->nfaStatesActive = 0;
+	winstate->nfaContextsActive = 0;
 
 	/*
 	 * Allocate varMatched array for NFA evaluation. With the new varNames
-- 
2.50.1 (Apple Git-155)