You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by amansinha100 <gi...@git.apache.org> on 2017/01/03 16:42:23 UTC

[GitHub] drill pull request #705: DRILL-5159: Make sure Drill's ProjectMergeRule oper...

Github user amansinha100 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/705#discussion_r94437725
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillMergeProjectRule.java ---
    @@ -48,6 +50,12 @@ public boolean matches(RelOptRuleCall call) {
         Project topProject = call.rel(0);
         Project bottomProject = call.rel(1);
     
    +    // Make sure both projects be LogicalProject.
    +    if (topProject.getTraitSet().getTrait(ConventionTraitDef.INSTANCE) != Convention.NONE ||
    --- End diff --
    
    At first glance, it is non-intuitive that a Drill specific MergeProjectRule returns False if a DRILL_LOGICAL convention is encountered.  However, currently, this rule only checks for the complex expression (e.g convert_to_json), so your change is fine in the context of the current rule.  
    In future, would we consider allowing merging 2 DrillProjectRels ? (I think yes). 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---