You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/12/23 22:40:58 UTC

[jira] [Commented] (DRILL-5159) ProjectMergeRule in Drill should operate on RelNodes with same convention trait.

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

ASF GitHub Bot commented on DRILL-5159:
---------------------------------------

GitHub user jinfengni opened a pull request:

    https://github.com/apache/drill/pull/705

    DRILL-5159: Make sure Drill's ProjectMergeRule operate on RelNodes wi…

    …th same convention trait.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jinfengni/incubator-drill DRILL-5159

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/705.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #705
    
----
commit 02af67c6223689e952cbe4775ccc6dec28269ada
Author: Jinfeng Ni <jn...@apache.org>
Date:   2016-12-22T02:00:46Z

    DRILL-5159: Make sure Drill's ProjectMergeRule operate on RelNodes with same convention trait.

----


> ProjectMergeRule in Drill should operate on RelNodes with same convention trait.
> --------------------------------------------------------------------------------
>
>                 Key: DRILL-5159
>                 URL: https://issues.apache.org/jira/browse/DRILL-5159
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>            Reporter: Jinfeng Ni
>            Assignee: Jinfeng Ni
>
> Drill extended version of  Calcite's ProjectMergeRule is used in a VolcanoPlanner where RelNodes with different convention could match with this rule. 
> For instance, we could see this rule could be invoked when a DrillProject on top of a LogicalProject. Also, since the output RelNode is built from the default Project RelFactory, such rule execution could end up with a LogicalProject.
> {code}
> DrillProject                transform          
> \                                  ===>               LogicalProject
> LogicalProject
> {code}
>  
> This leads to un-necessary rule execution, or in certain case could lead to an infinite loop.  
> The proposed fix is to check matched RelNodes to make sure that they do have Calcite Logical convention. That way, both inputs and output of this rule would have same convention trait.  This should reduce planning time, and avoid the possiblity of loop.



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