public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Rowley <[email protected]>
To: Chengpeng Yan <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Cc: cca5507 <[email protected]>
Cc: Tom Lane <[email protected]>
Subject: Re: [PATCH] Fix hashed ScalarArrayOp semantics for NULL LHS with non-strict comparators
Date: Thu, 23 Apr 2026 17:32:43 +1200
Message-ID: <CAApHDvrJMOReoQOOp-_bFAHH8NTbUPy5L-CwX5XQo_7m55YNMw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<CAApHDvoLFhtAFSwJdjsBcs9L4J4SzE09gkHLr9nJSGSj1CBaRw@mail.gmail.com>
	<CAApHDvr7K+Wu+ECgmZw057Mb1H6H87+ZWETHi28Ez_ALBKgmQA@mail.gmail.com>
	<[email protected]>
	<CAApHDvo=bOVURpRH_ydBYT_2R9PU4EvzzFfez1xV4RKBPRUPVA@mail.gmail.com>
	<[email protected]>

Thanks for looking.

On Thu, 23 Apr 2026 at 16:31, Chengpeng Yan <[email protected]> wrote:
> One possible improvement, though not
> a blocker, would be to defer the lhs-NULL handling until we actually
> encounter the first NULL on the lhs. That could avoid a bit of extra
> work in the common case where the lhs contains no NULLs.

I thought of it, but didn't do it as it meant having to keep a bit
more state to track if we've filled the cache yet, plus the extra
costs incurred to check if we've done it yet that would have to be
paid for every NULL lookup. We currently have to check if the hash
table has been set up already, so I felt more comfortable installing
the new code in with that.

David





view thread (11+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] Fix hashed ScalarArrayOp semantics for NULL LHS with non-strict comparators
  In-Reply-To: <CAApHDvrJMOReoQOOp-_bFAHH8NTbUPy5L-CwX5XQo_7m55YNMw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox