public inbox for [email protected]
help / color / mirror / Atom feedFrom: Zsolt Parragi <[email protected]>
To: Ilia Evdokimov <[email protected]>
Cc: David Geier <[email protected]>
Cc: Chengpeng Yan <[email protected]>
Cc: Tatsuya Kawata <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Hash-based MCV matching for large IN-lists
Date: Wed, 11 Mar 2026 08:01:37 +0000
Message-ID: <CAN4CZFOJ2nwOvLzkg_5n0NPfn37_as_O6th7OXey1it0UUhWKA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAHza6qdAH99C0xa27YDTixiNVFa99j90QYquUPAxL0JwahmggA@mail.gmail.com>
<[email protected]>
<CAN4CZFPb+iqQkby4AGvZSvL2OkwQ+S9CVvmJiQ=u6cckWPetqA@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAN4CZFO3Y25iCqqP_zS1ipgbrBXvAkxeLK2hPuamddyW9ouAzQ@mail.gmail.com>
<[email protected]>
+ if (elem_nulls[i])
+ {
+ nonmcv_cnt--;
+ continue;
+ }
> The patch v8 can still be reviewed as-is, and if the selectivity
> regression test gets committed [0], I will add corresponding tests for
> this change as well.
Without [0], the const path will return incorrect results for <> ALL
and NULLs. Compared to that, the other path still has special handling
in it:
+ /*
+ * For ALL semantics, if the array contains NULL, assume
+ * operator is strict. The ScalarArrayOpExpr cannot
+ * evaluate to TRUE, so return zero.
+ */
+ nonconst_sel = var_eq_non_const(&vardata, operator,
+ clause->inputcollid,
+ other_op, var_on_left,
+ isInequality);
+ if (isInequality)
+ individual_s = 1.0 - individual_s - nullfrac;
Isn't this the double negation issue again, which was once
mentioned/fixed earlier?
+ int count; /* number of occurrences of current value in */
That's a truncated comment
view thread (8+ 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], [email protected], [email protected]
Subject: Re: Hash-based MCV matching for large IN-lists
In-Reply-To: <CAN4CZFOJ2nwOvLzkg_5n0NPfn37_as_O6th7OXey1it0UUhWKA@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