Github user jinfengni commented on a diff in the pull request:
https://github.com/apache/drill/pull/705#discussion_r94443444
--- 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 --
You are right that the current Drill specific MergeProjectRule extends from
Calcite's version and the only difference is to check complex output
expression. Therefore, it make senses the currently Drill MergeProjectRule
operates on Calcite logical convention only.
Yes, in the future, we would consider allowing merging 2 DrillProjectRels.
That should be another instance of rule, which operates on DRILL_LOGICAL
convention only.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---