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

From Xuneng Zhou
Subject Re: Fix an unnecessary cast calling elog in ExecHashJoinImpl
Date
Msg-id CABPTF7VOnoKoG1S2hAQWysC7dkYN2Qre64Dtf3ai3MP6ghMHwQ@mail.gmail.com
Whole thread Raw
In response to Re: Fix an unnecessary cast calling elog in ExecHashJoinImpl  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: Fix an unnecessary cast calling elog in ExecHashJoinImpl
List pgsql-hackers
Hi,

On Mon, Sep 1, 2025 at 9:26 AM Chao Li <li.evan.chao@gmail.com> wrote:
>
>
>
> 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.
>

LGTM.

Best,
Xuneng



pgsql-hackers by date:

Previous
From: Bertrand Drouvot
Date:
Subject: Re: Preserve index stats during ALTER TABLE ... TYPE ...
Next
From: Xuneng Zhou
Date:
Subject: Re: Implement waiting for wal lsn replay: reloaded