From 5e6c7b9306211384933b6c22af816c02ca9c5504 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Thu, 2 Oct 2025 21:06:40 +0900 Subject: [PATCH v20 2/6] Modify get_windowfunc_expr_helper to handle IGNORE NULLS option. --- src/backend/utils/adt/ruleutils.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index c6d83d67b87..21663af6979 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -11091,7 +11091,12 @@ get_windowfunc_expr_helper(WindowFunc *wfunc, deparse_context *context, get_rule_expr((Node *) wfunc->aggfilter, context, false); } - appendStringInfoString(buf, ") OVER "); + appendStringInfoString(buf, ") "); + + if (wfunc->ignore_nulls == PARSER_IGNORE_NULLS) + appendStringInfoString(buf, "IGNORE NULLS "); + + appendStringInfoString(buf, "OVER "); if (context->windowClause) { -- 2.43.0