use of org.apache.flink.table.calcite.CalciteConfigBuilder in project flink by apache.
the class TableEnvironmentITCase method testCustomCalciteConfig.
@Test(expected = TableException.class)
public void testCustomCalciteConfig() {
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
BatchTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env, config());
CalciteConfig cc = new CalciteConfigBuilder().replaceOptRuleSet(RuleSets.ofList()).build();
tableEnv.getConfig().setCalciteConfig(cc);
DataSet<Tuple3<Integer, Long, String>> ds = CollectionDataSets.get3TupleDataSet(env);
Table t = tableEnv.fromDataSet(ds);
tableEnv.toDataSet(t, Row.class);
}
Aggregations