Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The following filters for a number are always true
x > 0 or x <= 0 or x is null x < 0 or x >= 0 or x is null x < 1 or x > 0 or x is null
where the 1/0 can be replaced by any number where the first is greater than the second
The following filter for a varchar is always true:
x LIKE '%' OR x is null
It would be nice if RexSimplify.simplifyOrTerms handled these cases.
Attachments
Issue Links
- causes
-
CALCITE-4258 SqlToRelConverter: SELECT 1 IS [NOT] DISTINCT FROM NULL fails with AssertionError
- Closed
- is related to
-
CALCITE-5780 Simplify '1 > x OR 1 <= x OR x IS NULL' to TRUE
- Closed
- relates to
-
CALCITE-4190 OR simplification incorrectly loses term
- Closed
-
CALCITE-4155 Simplify IN expression of discrete values
- Open
- links to