amaliujia commented on a change in pull request #1986:
URL: https://github.com/apache/calcite/pull/1986#discussion_r428807293



##########
File path: 
core/src/main/java/org/apache/calcite/plan/volcano/VolcanoRuleCall.java
##########
@@ -136,7 +155,9 @@ public void transformTo(RelNode rel, Map<RelNode, RelNode> 
equiv,
         volcanoPlanner.ensureRegistered(
             entry.getKey(), entry.getValue());
       }
-      volcanoPlanner.ensureRegistered(rel, rels[0]);
+      RelSubset subset = volcanoPlanner.ensureRegistered(rel, rels[0]);
+      // The subset is not used, but we need it, just for debugging
+      assert subset != null;

Review comment:
       Nit:  why not use `checkArgument` or something similar from Guava? Such 
that it can both check expected result, stop execute when not satisfying, and 
provide detailed description. 




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to