From ab4c13ffa59b3e988bcea2bcf0aa0954521603e7 Mon Sep 17 00:00:00 2001
From: "Chao Li (Evan)" <lic@highgo.com>
Date: Mon, 29 Dec 2025 16:50:14 +0800
Subject: [PATCH v1] Remove redundant AttStatsSlot initialization in
 eqjoinsel()

get_attstatsslot() always initializes the provided AttStatsSlot by
zeroing it internally, so callers do not need to pre-initialize the
structure.

In eqjoinsel(), the two memset() calls on sslot1 and sslot2 were
therefore redundant and have been removed. This brings the usage in
selfuncs.c in line with other callers of get_attstatsslot(), none of
which explicitly zero the slot before calling it.

No functional change intended.

Author: Chao Li <lic@highgo.com>
---
 src/backend/utils/adt/selfuncs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index c760b19db55..8d2ca1b8d42 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -2394,9 +2394,6 @@ eqjoinsel(PG_FUNCTION_ARGS)
 
 	opfuncoid = get_opcode(operator);
 
-	memset(&sslot1, 0, sizeof(sslot1));
-	memset(&sslot2, 0, sizeof(sslot2));
-
 	/*
 	 * There is no use in fetching one side's MCVs if we lack MCVs for the
 	 * other side, so do a quick check to verify that both stats exist.
-- 
2.39.5 (Apple Git-154)

