Hi Chengpeng,
Thanks for your review!
On 28.01.2026 16:08, Chengpeng Yan wrote:
* Treat NULL array elements as zero selectivity for ALL:
Agreed. For ALL/AND semantics the function now returns selectivity = 0.0 as soon as a NULL element is encountered.
* Fix cross-type equality argument order in `mcvs_in_equal`:
Agreed. Added 'op_is_reserved' flag MCVInHashContext, same as in MCVHashContext.
* Include non-MCV IN-list constants in non-disjoint selectivity:
This is not applicable to v3.
* Avoid double-negating inequality estimates for non-Const elements:
Agreed. var_eq_non_const() is now always with negate = false, not to call negation twice.
Attached v4 patch with above fixes.
--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC,
https://tantorlabs.com/