Re: Fix an unnecessary cast calling elog in ExecHashJoinImpl

From: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, tndrwang(at)gmail(dot)com
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix an unnecessary cast calling elog in ExecHashJoinImpl
Date: 2025-10-16 07:07:21
Message-ID: CABPTF7VOnoKoG1S2hAQWysC7dkYN2Qre64Dtf3ai3MP6ghMHwQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Sep 1, 2025 at 9:26 AM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>
>
>
> On Aug 30, 2025, at 14:09, Tender Wang <tndrwang(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2025-10-16 07:11:58 Re: Implement waiting for wal lsn replay: reloaded
Previous Message Bertrand Drouvot 2025-10-16 06:52:41 Re: Preserve index stats during ALTER TABLE ... TYPE ...