Hi,

While debugging the HashJoin codes, I noticed below codes
in ExecHashJoinImpl():

elog(ERROR, "unrecognized hashjoin state: %d",
(int) node->hj_JoinState);

The type of hj_JoinState is already int, so the cast seems unnecessary.
So I remove it in the attached patch.

-- 
Thanks,
Tender Wang
From e19c237a147c909ff0338a84f968674d67cb3861 Mon Sep 17 00:00:00 2001
From: Tender Wang <tndrw...@gmail.com>
Date: Sat, 30 Aug 2025 14:00:18 +0800
Subject: [PATCH] Fix an unnecessary cast calling elog in ExecHashJoinImpl()

---
 src/backend/executor/nodeHashjoin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/executor/nodeHashjoin.c 
b/src/backend/executor/nodeHashjoin.c
index 5661ad76830..30b02eb9f0d 100644
--- a/src/backend/executor/nodeHashjoin.c
+++ b/src/backend/executor/nodeHashjoin.c
@@ -669,7 +669,7 @@ ExecHashJoinImpl(PlanState *pstate, bool parallel)
 
                        default:
                                elog(ERROR, "unrecognized hashjoin state: %d",
-                                        (int) node->hj_JoinState);
+                                        node->hj_JoinState);
                }
        }
 }
-- 
2.34.1

Reply via email to