### Question:
Frameworks { public static ConfigBuilder newConfigBuilder() { return new ConfigBuilder(); } private  Frameworks(); static Planner getPlanner(FrameworkConfig config); static R withPlanner(final PlannerAction<R> action,
      final FrameworkConfig config); static R withPlanner(final PlannerAction<R> action); @Deprecated // to be removed before 2.0 static R withPrepare(PrepareAction<R> action); static R withPrepare(BasePrepareAction<R> action); static R withPrepare(FrameworkConfig config,
      BasePrepareAction<R> action); static SchemaPlus createRootSchema(boolean addMetadataSchema); static ConfigBuilder newConfigBuilder(); static ConfigBuilder newConfigBuilder(FrameworkConfig config);  }### Answer:
@Test public void testTypeSystem() { checkTypeSystem(19, Frameworks.newConfigBuilder().build()); checkTypeSystem(25, Frameworks.newConfigBuilder() .typeSystem(HiveLikeTypeSystem.INSTANCE).build()); checkTypeSystem(31, Frameworks.newConfigBuilder() .typeSystem(new HiveLikeTypeSystem2()).build()); }
@Test public void testJdbcValues() throws Exception { CalciteAssert.that() .with(CalciteAssert.SchemaSpec.JDBC_SCOTT) .doWithConnection(connection -> { try { final FrameworkConfig config = Frameworks.newConfigBuilder() .defaultSchema(connection.getRootSchema()) .build(); final RelBuilder builder = RelBuilder.create(config); final RelRunner runner = connection.unwrap(RelRunner.class); final RelNode values = builder.values(new String[]{"a", "b"}, "X", 1, "Y", 2) .project(builder.field("a")) .build(); if (false) { runner.prepare(values).executeQuery(); } final RelNode scan = builder.scan("JDBC_SCOTT", "EMP").build(); runner.prepare(scan).executeQuery(); builder.clear(); RelRunner runner2 = connection.unwrap(RelRunner.class); runner2.prepare(values).executeQuery(); } catch (Exception e) { throw TestUtil.rethrow(e); } }); }
@Test void testTypeSystem() { checkTypeSystem(19, Frameworks.newConfigBuilder().build()); checkTypeSystem(25, Frameworks.newConfigBuilder() .typeSystem(HiveLikeTypeSystem.INSTANCE).build()); checkTypeSystem(31, Frameworks.newConfigBuilder() .typeSystem(new HiveLikeTypeSystem2()).build()); }
@Test void testJdbcValues() throws Exception { CalciteAssert.that() .with(CalciteAssert.SchemaSpec.JDBC_SCOTT) .doWithConnection(connection -> { try { final FrameworkConfig config = Frameworks.newConfigBuilder() .defaultSchema(connection.getRootSchema()) .build(); final RelBuilder builder = RelBuilder.create(config); final RelRunner runner = connection.unwrap(RelRunner.class); final RelNode values = builder.values(new String[]{"a", "b"}, "X", 1, "Y", 2) .project(builder.field("a")) .build(); if (false) { runner.prepare(values).executeQuery(); } final RelNode scan = builder.scan("JDBC_SCOTT", "EMP").build(); runner.prepare(scan).executeQuery(); builder.clear(); RelRunner runner2 = connection.unwrap(RelRunner.class); runner2.prepare(values).executeQuery(); } catch (Exception e) { throw TestUtil.rethrow(e); } }); }