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



##########
File path: 
core/src/test/java/org/apache/calcite/plan/volcano/VolcanoPlannerTest.java
##########
@@ -296,6 +300,32 @@
                 "PhysSingleRel:RelSubset#0.PHYS.[]")));
   }
 
+  @Test void testTypeMismatch() {
+    VolcanoPlanner planner = new VolcanoPlanner();
+    planner.addRelTraitDef(ConventionTraitDef.INSTANCE);
+    planner.addRule(MockPhysLeafRule.INSTANCE);
+
+    RelOptCluster cluster = newCluster(planner);
+    NoneLeafRel leafRel =
+        new NoneLeafRel(
+            cluster,
+            "a");
+    RelNode convertedRel =
+        planner.changeTraits(
+            leafRel,
+            cluster.traitSetOf(PHYS_CALLING_CONVENTION));
+    planner.setRoot(convertedRel);
+    try {
+      planner.chooseDelegate().findBestExp();
+    } catch (RuntimeException e) {

Review comment:
       Done. Thank you for your advice.




----------------------------------------------------------------
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:
[email protected]


Reply via email to