You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Zoltan Haindrich (JIRA)" <ji...@apache.org> on 2018/04/10 12:07:00 UTC

[jira] [Comment Edited] (CALCITE-2247) Add rule to push in condition condition into a related disjunctive expression

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

Zoltan Haindrich edited comment on CALCITE-2247 at 4/10/18 12:06 PM:
---------------------------------------------------------------------

I've opened https://github.com/apache/calcite/pull/660

* I'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...

[~jcamachorodriguez]: could you please let me know what you think about this change in general? :)


was (Author: kgyrtkirk):
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)