Re: Improve hash join's handling of tuples with null join keys
Chao Li <li.evan.chao@gmail.com>
From: Chao Li <li.evan.chao@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Joel Jacobson <joel@compiler.org>,
pgsql-hackers@lists.postgresql.org
Date: 2026-03-19T06:55:04Z
Lists: pgsql-hackers
Attachments
- nocfbot.add-test-for-count-fix.diff (application/octet-stream) patch
> On Mar 19, 2026, at 03:10, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > "Joel Jacobson" <joel@compiler.org> writes: >> I've tested v3-0001 and v3-0002 and can confirm the bug introduced >> in v3-0001 is fixed in v3-0002: > > Thanks for testing! > > I noticed from the cfbot that this patch wasn't building anymore. > nodeHash[join].c now need explicit inclusions of utils/tuplestore.h, > presumably as a result of Alvaro's recent header-inclusion cleanups. > Here's a v4 that fixes that; no other changes. > > We're getting towards the end of the v19 development cycle, so > I'm planning to push this soon if there's not objections. > I remember I reviewed this patch some time ago, so I revisited v4 today and played with it a bit Overall, this looks like a solid patch to me. The only thing I noticed is that while 0002 fixes the tuple-counting issue, there does not seem to be a test that would fail without it. So I think it would be better to add a test case for 0002. I tried doing that and attached a diff. Without 0002, the test fails; with 0002, it passes. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/
Commits
-
Improve hash join's handling of tuples with null join keys.
- 1811f1af98fb 19 (unreleased) landed