xiedeyantu commented on code in PR #4399:
URL: https://github.com/apache/calcite/pull/4399#discussion_r2110743935
##########
core/src/test/java/org/apache/calcite/tools/FrameworksTest.java:
##########
@@ -439,6 +441,36 @@ private void checkTypeSystem(final int expected,
FrameworkConfig config) {
CalciteSystemProperty.DEBUG.value());
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-7039">[CALCITE-7039]
+ * PlannerImpl supports custom Volcano RuleSet</a>. */
+ @Test void testAddCustomRules() throws Exception {
+ Table table = new TableImpl();
+ final SchemaPlus rootSchema = Frameworks.createRootSchema(true);
+ SchemaPlus schema = rootSchema.add("x", new AbstractSchema());
+ schema.add("MYTABLE", table);
+ List<RelTraitDef> traitDefs = new ArrayList<>();
+ traitDefs.add(ConventionTraitDef.INSTANCE);
+ traitDefs.add(RelDistributionTraitDef.INSTANCE);
+ SqlParser.Config parserConfig =
+ SqlParser.Config.DEFAULT
+ .withCaseSensitive(false);
+
+ final FrameworkConfig config = Frameworks.newConfigBuilder()
Review Comment:
> How about I add one more case, that is, add a minimum set of executable
EnumerableRules?
@NobiGo I think I understand what you mean. I think this should be used as a
positive test and prove that.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]