From 5aaededb9164063ca48c41eca9200f9070b5d5a8 Mon Sep 17 00:00:00 2001 From: Yongtao Huang <99629139+hyongtao-db@users.noreply.github.com> Date: Thu, 2 Jan 2025 14:52:28 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20different=20input=20order=20of=20func=20a?= =?UTF-8?q?pply=5Fnew=5Fdelta=5Fwith=5Fcount=E2=80=98s=20declaration=20and?= =?UTF-8?q?=20definition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - declaration: apply_new_delta_with_count(... StringInfo target_list, StringInfo aggs_set, ...) - definition: apply_new_delta_with_count(... StringInfo aggs_set, StringInfo target_list, ...) the input order is different. --- matview.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matview.c b/matview.c index e778b1f..9212c8f 100644 --- a/matview.c +++ b/matview.c @@ -2063,7 +2063,7 @@ apply_delta(Oid matviewOid, Tuplestorestate *old_tuplestores, Tuplestorestate *n /* apply new delta */ if (use_count) apply_new_delta_with_count(matviewname, NEW_DELTA_ENRNAME, - keys, aggs_set_new, &target_list_buf, count_colname, + keys, &target_list_buf, aggs_set_new, count_colname, query->distinctClause != NULL); else apply_new_delta(matviewname, NEW_DELTA_ENRNAME, &target_list_buf); @@ -2547,7 +2547,7 @@ apply_old_delta(const char *matviewname, const char *deltaname_old, */ static void apply_new_delta_with_count(const char *matviewname, const char* deltaname_new, - List *keys, StringInfo aggs_set, StringInfo target_list, + List *keys, StringInfo target_list, StringInfo aggs_set, const char* count_colname, bool distinct) { StringInfoData querybuf;