[
https://issues.apache.org/jira/browse/CALCITE-7041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17953943#comment-17953943
]
Sergey Nuyanzin commented on CALCITE-7041:
------------------------------------------
{quote}
For example a > 2 AND 1/0 = 1 AND a < 2 AND A IS NOT NULL.
This is not the same as FALSE.
{quote}
hm..., current version of Calcite optimizes this to {{FALSE}} already in case
of constants like in a query above.
I created this for the case of non constants in predicates
> Simplify simple contradicting expressions
> -----------------------------------------
>
> Key: CALCITE-7041
> URL: https://issues.apache.org/jira/browse/CALCITE-7041
> Project: Calcite
> Issue Type: Improvement
> Reporter: Sergey Nuyanzin
> Priority: Major
>
> For instance
> {code:sql}
> a > b AND b > a AND a IS NOT NULL AND b IS NOT NULL
> {code}
> or
> {code:sql}
> a >= b AND b > a AND a IS NOT NULL AND b IS NOT NULL
> {code}
> or
> {code:sql}
> a > b AND b >= a AND a IS NOT NULL AND b IS NOT NULL
> {code}
> could be simplified to {{FALSE}}
> and
> {code:sql}
> a >= b AND b >= a AND a IS NOT NULL AND b IS NOT NULL
> {code}
> could be simplified to {{a = b}}
> Probably there is something else
--
This message was sent by Atlassian Jira
(v8.20.10#820010)