final SchemaPlus rootSchema = Frameworks.createRootSchema(true);
rootSchema.add("DB1", new ReflectiveSchema(new RowExpressionBuilder.Db1()));
final FrameworkConfig config = Frameworks.newConfigBuilder()
.defaultSchema(rootSchema).build();
String sql = "";
PlannerImpl planner = new PlannerImpl(config);//执行计划需要进行解析,验证,转换三步
SqlNode parse = planner.parse(sql);
SqlNode validate = planner.validate(parse);
RelNode convert = planner.convert(validate);//
String s = RelOptUtil.toString(convert);//输出可读的关系表达式