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

Zoltan Haindrich commented on CALCITE-2555:
-------------------------------------------

[~vladimirsitnikov] e2098d3073172b15882825bdc355755af1ae135e was created 
*after* my comment; to address the issue I've described...

If it matters: I still think that this will work better if the simplifyStrong 
call would be at the end of simplify_ method because:

* it will then free of charge could build upon if any other simplification 
methods have produced a {{null}} value... 
** I'm not sure if currently in case of {{(a is null && ( a == b  || a== c) )}} 
; the {{(a is null)}} is subtituted or not: but if it is then the current 
implementation would need 2 pass of simplification to figure out that this 
expression is {{(a is null && null)}}
* it will not need a separate recursion anymore (because it could run with the 
main recursion)


> RexSimplify: >=(true, null) could be simplified to null
> -------------------------------------------------------
>
>                 Key: CALCITE-2555
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2555
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Vladimir Sitnikov
>            Assignee: Julian Hyde
>            Priority: Major
>              Labels: newbie
>
> {code:java}
> @Test public void simplifyComparisonWithNull() {
>   checkSimplify2(ge(trueLiteral, falseLiteral), "true", "true");
>   checkSimplify2(ge(trueLiteral, nullBool), "null", "false");
>   checkSimplify2(ge(nullBool, nullBool), "null", "false");
> }
> {code}



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

Reply via email to