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

MinJi Kim commented on CALCITE-1953:
------------------------------------

[~julianhyde]  I made changes to the PR according to your comments.  I modified 
the SqlKind.negate() and negateNullSafe()  so that we negate the operators 
properly.  Thanks again for reviewing!

It looks like the change to ReduceExpressionsRule is no longer needed (fixed in 
[CALCITE-1397] ClassCastException in FilterReduceExpressionsRule, 0a1a190).

https://github.com/apache/calcite/pull/521

> 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