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

Julian Hyde commented on CALCITE-2247:
--------------------------------------

Glad this is working out for you. I like the idea of two passes better than 
sorting, because it is deterministic. One thing to be watch out for: that 
during pass 1 we generate a constraint from term 1 to simply term 2, and during 
pass 2 we generate a constraint from term 2 that we use to simplify term 1. 
There seems to be a danger of circular reasoning, so please make sure that 
doesn't happen.

I look forward to reviewing this change.

> 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