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

Julian Hyde commented on CALCITE-1116:
--------------------------------------

I renamed "filterCondition" to "unknownAsFalse" to make the semantics explicit.

I still have doubts about how we approach null semantics. I think it's very 
difficult to catch every last bug. For example, it doesn't seem valid to pass 
unknownAsFalse unchanged into simplifyNot. If you have {{WHERE NOT (a < 10 AND 
a >= 10)}}, {{WHERE}} will treat an unknown result of {{NOT (a < 10 AND a >= 
10)}} as false, but that would mean treating an unknown result of {{a < 10 AND 
a >= 10}} as true. I think there are similar issues in CASE. I don't propose 
that you or we fix all of these problems; we should just spray-paint 
"architecturally unsafe" on the whole thing and start looking for a better 
solution.

With these reservations, patch looks good, and I will commit shortly.

> Extend simplify for reducing expressions
> ----------------------------------------
>
>                 Key: CALCITE-1116
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1116
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>             Fix For: 1.7.0
>
>
> We would like to cover more cases in expression simplification, such as:
> x>5 and x is not null => x>5
> x>5 and x is null => not satisfiable
> x>5 and x<=5 => not satisfiable



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to