1. Full-dimensional top-level AND equality miss, using the ndistinct-based average estimate when matching ndistinct statistics exist, with the least-MCV frequency as an upper bound; otherwise using the cap alone.
I've implemented the ndistinct-based estimation and attached it as v3-0002. The patch applies cleanly and pg-ci.yml passes.
## v3-0001
- logic remains the same
- added a `IsA(clause, RestrictInfo)` check before casting to RestrictInfo in `mcv_can_cap()`
- added some tests
## v3-0002
- used ndistinct to calculate `non_mcv_sel = (1.0 - mcv_totalsel) / (ndistinct - mcv_nitems)` and applied it as an upper bound for non-MCV combinations, similarly to what `var_eq_const()` does in `selfuncs.c`