You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Sean Hsuan-Yi Chu (JIRA)" <ji...@apache.org> on 2016/02/25 07:13:18 UTC

[jira] [Commented] (CALCITE-1100) If ReduceExpressionsRule generates the same plan, the original plan stops triggering other rules

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

Sean Hsuan-Yi Chu commented on CALCITE-1100:
--------------------------------------------

[~julianhyde] Would you mind helping review ?

https://github.com/apache/calcite/pull/199

Thanks!

> If ReduceExpressionsRule generates the same plan, the original plan stops triggering other rules
> ------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-1100
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1100
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Sean Hsuan-Yi Chu
>            Assignee: Sean Hsuan-Yi Chu
>
> Calcite allows users to implement a customized RelOptPlanner#Executor to determine how a RexNode is reduced to another. 
> In some cases, the customized RelOptPlanner#Executor might decide not to do any reduction for a given RexNode (i.e., constExps2 and reducedValues are the same in [1]).
> However, for these cases, Calcite is not aware of the {color:red}new plan is equivalent to the old one{color}, but just go ahead to force the {color:red}Importance{color} of the old/new plan as ZERO [2]. After the {color:red}Importance{color} becomes ZERO, the original plan stops triggering other rules
> [1] github code: https://github.com/apache/calcite/blob/f55d10c147746d6299fb713adc184576380a1f49/core/src/main/java/org/apache/calcite/rel/rules/ReduceExpressionsRule.java#L508
> [2] github code:
> https://github.com/apache/calcite/blob/f55d10c147746d6299fb713adc184576380a1f49/core/src/main/java/org/apache/calcite/rel/rules/ReduceExpressionsRule.java#L184



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)