use of io.druid.sql.calcite.rel.QueryMaker in project druid by druid-io.
the class PlannerFactory method createPlanner.
public DruidPlanner createPlanner(final Map<String, Object> queryContext) {
final PlannerContext plannerContext = PlannerContext.create(plannerConfig, queryContext);
final QueryMaker queryMaker = new QueryMaker(walker, plannerContext);
final FrameworkConfig frameworkConfig = Frameworks.newConfigBuilder().parserConfig(SqlParser.configBuilder().setCaseSensitive(true).setUnquotedCasing(Casing.UNCHANGED).setQuotedCasing(Casing.UNCHANGED).setQuoting(Quoting.DOUBLE_QUOTE).build()).defaultSchema(rootSchema).traitDefs(ConventionTraitDef.INSTANCE, RelCollationTraitDef.INSTANCE).convertletTable(new DruidConvertletTable(plannerContext)).operatorTable(operatorTable).programs(Rules.programs(queryMaker, operatorTable)).executor(new RexExecutorImpl(Schemas.createDataContext(null))).context(Contexts.EMPTY_CONTEXT).typeSystem(RelDataTypeSystem.DEFAULT).defaultSchema(rootSchema.getSubSchema(DruidSchema.NAME)).build();
return new DruidPlanner(Frameworks.getPlanner(frameworkConfig), plannerContext);
}
Aggregations