[
https://issues.apache.org/jira/browse/CALCITE-3192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17028943#comment-17028943
]
Zoltan Haindrich commented on CALCITE-3192:
-------------------------------------------
I think I might be interpreting your example a little bit differently; let me
try to convince you that I think your expression is null (in case a is null and
b=2)
{code}
(1<a) or ((a<3 and b=2) is null)
{code}
comparision of `a` becomes null, b=2 is true
{code}
null or ((null and true) is null)
{code}
null and true => null
{code}
null or (null is null)
{code}
null or true => true
As a result of this patch we don't anymore allow '<' during this
simplification step; so right now RexSimplify should not make any tricky with
'a>1' or similar to that...
If you do have a case in which the simplification still makes an error, please
share it
> Simplification may weaken OR conditions containing inequalities
> ---------------------------------------------------------------
>
> Key: CALCITE-3192
> URL: https://issues.apache.org/jira/browse/CALCITE-3192
> Project: Calcite
> Issue Type: Bug
> Reporter: Jess Balint
> Assignee: Zoltan Haindrich
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.21.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> RexSimplify is transforming
> * {{OR(AND(>(999, $8), =($2, 'Franklin')), <(100, $8))}}
> * to {{OR(=($2, 'Franklin'), <(100, $8))}}
> the predicates are accumulated in {{simplifyOrTerms()}} but not discarded
> when iterating the second time
--
This message was sent by Atlassian Jira
(v8.3.4#803005)