[
https://issues.apache.org/jira/browse/CALCITE-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432147#comment-16432147
]
Zoltan Haindrich commented on CALCITE-2247:
-------------------------------------------
I've opened https://github.com/apache/calcite/pull/660
've limited the rule to be only applied if it could do a reduction; applied
only if it could remove at least 1 operand; I've choosen to add it to
ReduceExpressionRule; because it's more like what CaseShuttle is doing...I
think this could be extended to be applied not only to = but for >,< ... and
the current patch currently doesn't support more complex cases when there are
multiple ors/conditions
let me know what you think about it in general :)
> 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: {a = 1 && (a=1 || a=2)} to {a=1}
> conditions to apply will be:
> * in an AND condition exists a comparision(c) and an OR (o)
> * o and c only reference 1 variable
> HIVE-19097 for more info
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)