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/05/21 17:38:45 UTC

[GitHub] [calcite] amaliujia commented on a change in pull request #1986: [CALCITE-4003] Disallow cross convention matching and generation in TransformationRule

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