[ 
https://issues.apache.org/jira/browse/CALCITE-1794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17477625#comment-17477625
 ] 

xiong duan commented on CALCITE-1794:
-------------------------------------

{code:java}
$1<>3 AND $1=5{code}
can't be simplify to 
{code:java}
 $1=5{code}
Because $1<>3 is the first.

If we set the condition this:
{code:java}
$1=5 and $1<>3{code}
Then the result will be:
{code:java}
$1=5{code}
So Do we need a PR to reorder this?

> Simplify AND numeric comparisons when overlapping
> -------------------------------------------------
>
>                 Key: CALCITE-1794
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1794
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Remus Rusanu
>            Assignee: Haisheng Yuan
>            Priority: Major
>
> Expressions such as {{$1<>1 and $1=2}} can be simplified to {{$1=2}}. Similar 
> {{$1>10 AND $1>20}} can be simplified to {{$1>20}}. Such expressions are 
> produced by the proposed solution for CALCITE-1790 (simplify boolean CASE to 
> complex AND/OR).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to