Hi,
Here is a patch for the estimate. IS NOT DISTINCT FROM is estimated
like "=", so row pairs with NULL on both sides are never counted. The
patch adds the product of the two null fractions to the "=" estimate.
Two tables of 2000 rows, 30% NULL, joined on
x.a IS NOT DISTINCT FROM y.a:
master rows=1400 actual rows=361400
patched rows=361400 actual rows=361400
Thanks,
Shihao