[ https://issues.apache.org/jira/browse/CALCITE-3192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16883900#comment-16883900 ]
Zoltan Haindrich commented on CALCITE-3192: ------------------------------------------- {code} z or ( x and y ) z or ( x and y and !z ) {code} part of the problem is that !z is retained as a predicate; so its not there physically but when (y -> !z) is true then y is removed incorrectly the fully correct way would be to add this things to the expression; but that would just create a lot of redundant noise...I'll think about it > Simplify OR incorrectly weaks condition > --------------------------------------- > > Key: CALCITE-3192 > URL: https://issues.apache.org/jira/browse/CALCITE-3192 > Project: Calcite > Issue Type: Bug > Reporter: Jess Balint > Priority: Major > > 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 (v7.6.14#76016)