You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/11/13 15:44:53 UTC

[GitHub] [calcite] hsyuan commented on a change in pull request #1543: [CALCITE-3455] Redundant rule firing for both logical and physical nodes

hsyuan commented on a change in pull request #1543: [CALCITE-3455] Redundant rule firing for both logical and physical nodes
URL: https://github.com/apache/calcite/pull/1543#discussion_r345834900
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/rules/ProjectMergeRule.java
 ##########
 @@ -68,6 +70,18 @@ public ProjectMergeRule(boolean force, ProjectFactory projectFactory) {
 
   //~ Methods ----------------------------------------------------------------
 
+  @Override public boolean matches(final RelOptRuleCall call) {
+    // We only merge logical project nodes with VolcanoPlanner. Since LogicalProject
+    // would be converted into physical nodes later. There's no need to fire this
+    // rule on physical project nodes again.
+    if (call.getPlanner() instanceof VolcanoPlanner
 
 Review comment:
   Yes, I agree with @zabetak.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services