[
https://issues.apache.org/jira/browse/CALCITE-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432189#comment-16432189
]
Jesus Camacho Rodriguez commented on CALCITE-2247:
--------------------------------------------------
[~kgyrtkirk], there is a class called {{RexImplicationChecker}} that tries to
infer whether a given predicate, e.g., {{a = 1}} implies another predicate
{{(a=1 || a=2)}}. Given that the code is rather similar, I wonder whether it
would be better to extend {{RexSimplify.simplifyOr}} so that it calls
{{RexImplicationChecker}} to try remove any of its operands. Could you explore
whether that would work? I am trying to avoid ending up with duplicate code
with the same goal. Also I think that the implementation may be more
straightforward.
> 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)