You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Steven Talbot (Jira)" <ji...@apache.org> on 2020/08/05 20:58:00 UTC

[jira] [Created] (CALCITE-4159) RexSimplify should simplify more always true OR expressions

Steven Talbot created CALCITE-4159:
--------------------------------------

             Summary: RexSimplify should simplify more always true OR expressions
                 Key: CALCITE-4159
                 URL: https://issues.apache.org/jira/browse/CALCITE-4159
             Project: Calcite
          Issue Type: Improvement
            Reporter: Steven Talbot


The following filters for a number are always true
{noformat}
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{noformat}
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:
{noformat}
x LIKE '%' OR x is null{noformat}
It would be nice if RexSimplify.simplifyOrTerms handled these cases.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)