On Fri, 7 Jul 2023 at 19:03, Richard Guo <guofenglinux@gmail.com> wrote: > Attached is what I have in mind. The patch extends the logic from two > points. > > * it also checks OR clauses to see if it is always true. > > * it also checks for join clauses by additionally testing if the nulling > bitmap is empty.
Do you mind writing some regression tests for this?
I don't really see an existing test file that would suit, maybe it's worth adding something like predicate.sql
Here is v3 patch with regression tests. I add the new test into the group where stats test is in, but I'm not sure if this is the right place.