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

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

[~julianhyde],
TL;DR: I don't really see where you are heading to.
I'm sure my "rex simplify" JIRA issues are way above in qualify than an average 
bug report.

1) The description clearly provides a test case, and a failure message. 
Assertion error strongly suggests that the bug would manifest itself as "wrong 
results from SQL" in real life scenarios.
2) It is (somewhat) clear that the result of simplification for the given input 
is just wrong. It was not me who created the assertion in question, and I find 
its message a decent one
3) I don't really know the full set of impacted cases. As [~pzw2018] 
identified, the bug was located in {{RexUtil#andNot}}. That method is used in 
several places (e.g. {{AbstractMaterializedViewRule}}), so true impact of the 
bug might be much more severe (e.g. wrong results when materializations are 
used and/or infinite planning)
4) The exact conditions to trigger a bug (which is true bug like "wrong results 
from SQL") might be hard to identify

> 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
>             Fix For: 1.18.0
>
>
> {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