Re: Fix an unnecessary cast calling elog in ExecHashJoinImpl - Mailing list pgsql-hackers

From Chao Li
Subject Re: Fix an unnecessary cast calling elog in ExecHashJoinImpl
Date
Msg-id AF34CC0C-9404-482B-BF50-8FDF7647F2B1@gmail.com
Whole thread Raw
In response to Fix an unnecessary cast calling elog in ExecHashJoinImpl  (Tender Wang <tndrwang@gmail.com>)
List pgsql-hackers


On Aug 30, 2025, at 14:09, Tender Wang <tndrwang@gmail.com> wrote:

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
<0001-Fix-an-unnecessary-cast-calling-elog-in-ExecHashJoin.patch>

Yes, hj_JoinState is of type int, so the type cast to int is not needed. The change looks good to me.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/




pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Raw parse tree is not dumped to log
Next
From: Richard Guo
Date:
Subject: Re: Eager aggregation, take 3