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

Vladimir Sitnikov commented on CALCITE-2586:
--------------------------------------------

[~julianhyde], fun fact: the optimization in question is "transformation of 
CASE ... END to   AND/OR". As we discussed, those expressions are likely to 
have different semantics with regard to the predicate evaluation order.

So the question is: should we cut the simplification from RexSimplify 
altogether?

> RexSimplify: case with repeated branches results in assertion error
> -------------------------------------------------------------------
>
>                 Key: CALCITE-2586
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2586
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Vladimir Sitnikov
>            Assignee: Julian Hyde
>            Priority: Major
>              Labels: newbie
>
> {code:java}        case_(
>             eq(falseLiteral, falseLiteral), falseLiteral,
>             eq(falseLiteral, falseLiteral), isNotNull(trueLiteral),
>             isNull(trueLiteral)
>         );
> {code}
> {noformat}
> java.lang.AssertionError: result mismatch: when applied to {},
> CASE(=(false, false), false, =(false, false), IS NOT NULL(true), IS 
> NULL(true)) yielded false,
> and =(false, false) yielded true{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to