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

Julian Hyde commented on CALCITE-1953:
--------------------------------------

Reviewing 
https://github.com/apache/calcite/pull/521/commits/90b34d7c28353ab7b819d62a85e38594591367fc,
 I don't see the point of the change to ReduceExpressionsRule. The tests pass 
without it.

> Reducing NOT() should not collaose NOT(IS_TRUE) to IS_FALSE for nullable 
> inputs
> -------------------------------------------------------------------------------
>
>                 Key: CALCITE-1953
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1953
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: MinJi Kim
>            Assignee: Julian Hyde
>
> In RexSimplify, when simplifying NOT(), we negate the input expression.  But 
> for IS_FALSE/IS_TRUE/IS_NOT_FALSE/IS_NOT_TRUE this cannot be just negated if 
> the input is nullable.
> {code}
> IS_FALSE(null) = false
> IS_TRUE(null) = false
> NOT(IS_FALSE(null)) = true != IS_TRUE(null)
> IS_NOT_FALSE(null) = true
> IS_NOT_TRUE(null) = true
> NOT(IS_NOT_FALSE(null)) = false != IS_NOT_TRUE(null)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to