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

Julian Hyde commented on CALCITE-2620:
--------------------------------------

In the fix to CALCITE-2506 I see {code}checkSimplify2(coalesce(gt(nullInt, 
nullInt), trueLiteral),
        "COALESCE(null, true)", "COALESCE(null, true)");{code}

The fact that "COALESCE(null, true)" remains in the simplified result, rather 
than having been further simplified to "true", implies that this bug is not 
fixed.

> Simplify "coalesce(null,x)" to "x"
> ----------------------------------
>
>                 Key: CALCITE-2620
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2620
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.18.0
>            Reporter: pengzhiwei
>            Assignee: Julian Hyde
>            Priority: Major
>
> "coalesce(x0,x1,.....)" can be simplified if any of "xi" is null literal.
> e.g.  "coalesce(null,x)" can simplify to "x", "coalesce(x,null,y)" can 
> simplify to "coalesce(x,y)"



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

Reply via email to