Now, the following query with IS NOT NULL:
Is simplified to:
It seems that the simplification of complex `AND` filters incorrectly simplify `IS NOT NULL` to `TRUE`.
During simplification, `IS NOT NULL` is transformed to `SEARCH($3, Sarg[(-∞..+∞), null])` instead of `SEARCH($3, Sarg[(-∞..+∞)])`.
Also, the following query with IS NULL:
Is simplified to the following query:
However, now it is correct when transformed into a Sarg, but incorrect after `RexUtil.expandSearch()` expansion.
A simpler query does not show this issue (stays the same):
The patch with the corresponding test cases is in attachments.