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

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

I've went forward and tried to cover CALCITE-2257 also in RexSimplify; but I 
had to cover some other things like:

* add support of predicates for "isNull" constructs
* add a new "kind" filter to include IS_NULL also -- I feel that probably 
adding a class like Comparision (or extending it) would be beneficiacal
* NOT_EQUALS is currently not handled in predicates well; so the simplification 
happens if I write {{ (a!=1) || (a=1) }}  but not for {{ (a==1) || (a!=1) }}  - 
this is currently not addressed my partial; I think probably the original 
reason behind this should be investigated first...
* there are some interesting test result changes; which might raise eyebrows - 
but so far I've convinced myself that they are okay...

I think it would be better to get the support for OR in serparetly

[~julianhyde] Could you take a look at these changes?

> 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