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 2020/11/04 04:00:24 UTC

[GitHub] [calcite] chunweilei commented on a change in pull request #2243: Fix grammatical errors in TopDownRuleDriver/TopDownRuleQueue/RuleDriver/VolcanoPlanner

chunweilei commented on a change in pull request #2243:
URL: https://github.com/apache/calcite/pull/2243#discussion_r517085070



##########
File path: core/src/main/java/org/apache/calcite/plan/volcano/TopDownRuleDriver.java
##########
@@ -311,31 +311,31 @@ default boolean onProduce(RelNode node) {
       }
 
       if (group.taskState != null && upperBound.isLe(group.upperBound)) {
-        // either this group failed to optimize before or it is a ring
+        // Either this group failed to optimize before or it is a ring.
         return;
       }
 
       group.startOptimize(upperBound);
 
-      // cannot decide an actual lower bound before MExpr are fully explored
-      // so delay the lower bound checking
+      // Cannot decide an actual lower bound before MExpr are fully explored.
+      // So delay the lower bound check.
 
-      // a gate keeper to update context
+      // A gate keeper to update context.
       tasks.push(new GroupOptimized(group));
 
-      // optimize mExprs in group
+      // Optimize mExprs in group.
       List<RelNode> physicals = new ArrayList<>();
       for (RelNode rel : group.set.rels) {
         if (planner.isLogical(rel)) {
           tasks.push(new OptimizeMExpr(rel, group, false));
         } else if (rel.isEnforcer()) {
-          // Enforcers have lower priority than other physical nodes
+          // Enforcers have lower priority than other physical nodes.
           physicals.add(0, rel);
         } else {
           physicals.add(rel);
         }
       }
-      // always apply O_INPUTS first so as to get an valid upper bound
+      // Always apply O_INPUTS first so as to get an valid upper bound.

Review comment:
       Done.

##########
File path: core/src/main/java/org/apache/calcite/plan/volcano/TopDownRuleDriver.java
##########
@@ -170,27 +170,27 @@ private void clearProcessed(RelSet set) {
     }
   }
 
-  // a callback invoked when a RelNode is going to be added into a RelSubset,
-  // either by Register or Reregister. The task driver should need to schedule
-  // tasks for the new nodes.
+  // A callback invoked when a RelNode is going to be added into a RelSubset,
+  // either by Register or Reregister. The task driver should schedule tasks
+  // for the new nodes.
   @Override public void onProduce(RelNode node, RelSubset subset) {
 
-    // if the RelNode is added to another RelSubset, just ignore it.
-    // It should be schedule in the later OptimizeGroup task
+    // If the RelNode is added to another RelSubset, just ignore it.
+    // It should be scheduled in the later OptimizeGroup task.
     if (applying == null || subset.set
         != VolcanoPlanner.equivRoot(applying.group().set)) {
       return;
     }
 
-    // extra callback from each task
+    // Extra callback from each task.
     if (!applying.onProduce(node)) {
       return;
     }
 
     if (!planner.isLogical(node)) {
       // For a physical node, schedule tasks to optimize its inputs.
       // The upper bound depends on all optimizing RelSubsets that this Rel belongs to.

Review comment:
       Done.




----------------------------------------------------------------
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