Hi Tom,
> I'm not so sure :-(. Looking at the last example you showed...
I think I was over optimistic earlier. I took a look this afternoon
and I think you are right here. So the idea is WHERE is simplified
earlier and not able to see the stats, but the CHECK can.
> So I think the only really acceptable answer here is going to be to
> fix things so we don't try to do eval_const_expressions until we've
> loaded up all the RelOptInfo statistical data.
I am not sure we can postpone the WHERE clause, since it is
simplified before any RelOptInfo exists. That feels like a very big change.
Could we load the column stats first instead? We already
do that for NOT NULL columns in preprocess_relation_rtes.
Thanks,
Shihao