Re: Fix an unnecessary cast calling elog in ExecHashJoinImpl

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Tender Wang <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-09-01 01:25:51
Message-ID: AF34CC0C-9404-482B-BF50-8FDF7647F2B1@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2025-09-01 01:32:33 Re: Eager aggregation, take 3
Previous Message Tatsuo Ishii 2025-09-01 01:13:08 Re: Raw parse tree is not dumped to log