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

Zoltan Haindrich commented on CALCITE-2247:
-------------------------------------------

I've also thinked about this; and I've ended up with something similar (3 
special cases); but I think the key here is not the handling/mapping of 
unknown... instead the handling of a specific boolean value which will matter 
in the outer evaluation... so for: P IS NULL : its only matter whenever P is 
NULL and true/false is not that interesting  - the other 2 is similar to 
"unknown as false" ( only true matters) or "unknown is true" (only false 
matters). 

So I think using it like this probably {{( (x>5) IS NOT NULL ) }} could be 
rewritten to {{x is not null}}; because true/false doesn't matter.

> Add rule to push in condition condition into a related disjunctive expression
> -----------------------------------------------------------------------------
>
>                 Key: CALCITE-2247
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2247
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>
> Simplify expressions like: {code}a = 1 AND (a = 1 OR a = 2){code} to {code}a 
> = 1{code}
> Conditions to apply will be:
> * in an AND condition there exists a comparison(c) and an OR (o)
> * o and c only reference 1 variable
> See HIVE-19097 for more info.



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

Reply via email to