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

Danny Chan commented on CALCITE-3049:
-------------------------------------

Instead of revisit the the simplified RexNode's operand, i think we should 
simplify the operand first before we actually simplify the IS NULL(IS NOT NULL)

I also found that the CAST has got force passed when we simplify theĀ IS NULL(IS 
NOT NULL), which actually we can make some progress to simplify the CASTs first 
(The redundant casts can be removed)

> When simplifying expressions, revisit "IS NULL" if its argument has been 
> simplified
> -----------------------------------------------------------------------------------
>
>                 Key: CALCITE-3049
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3049
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Julian Hyde
>            Assignee: Danny Chan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When simplifying expressions, revisit "IS NULL" if its argument has been 
> simplified. For example, we currently simplify {code}(CASE WHEN FALSE THEN 
> +(v0) ELSE -1 END) IS UNKNOWN{code} to {code}-1 IS UNKNOWN{code} but we 
> should further simplify that to {{FALSE}}.
> I have a preliminary [dev 
> branch|https://github.com/julianhyde/calcite/tree/3049-simplify-is-null], but 
> it needs a little more debugging. I'd be grateful if someone could finish it.



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

Reply via email to