Search in sources :

Example 11 with PlannerConfig

use of org.apache.druid.sql.calcite.planner.PlannerConfig in project druid by druid-io.

the class DruidStatementTest method setUp.

@Before
public void setUp() throws Exception {
    walker = CalciteTests.createMockWalker(conglomerate, temporaryFolder.newFolder());
    final PlannerConfig plannerConfig = new PlannerConfig();
    final DruidOperatorTable operatorTable = CalciteTests.createOperatorTable();
    final ExprMacroTable macroTable = CalciteTests.createExprMacroTable();
    DruidSchemaCatalog rootSchema = CalciteTests.createMockRootSchema(conglomerate, walker, plannerConfig, AuthTestUtils.TEST_AUTHORIZER_MAPPER);
    final PlannerFactory plannerFactory = new PlannerFactory(rootSchema, CalciteTests.createMockQueryMakerFactory(walker, conglomerate), operatorTable, macroTable, plannerConfig, AuthTestUtils.TEST_AUTHORIZER_MAPPER, CalciteTests.getJsonMapper(), CalciteTests.DRUID_SCHEMA_NAME);
    this.sqlLifecycleFactory = CalciteTests.createSqlLifecycleFactory(plannerFactory);
}
Also used : PlannerConfig(org.apache.druid.sql.calcite.planner.PlannerConfig) DruidSchemaCatalog(org.apache.druid.sql.calcite.schema.DruidSchemaCatalog) PlannerFactory(org.apache.druid.sql.calcite.planner.PlannerFactory) DruidOperatorTable(org.apache.druid.sql.calcite.planner.DruidOperatorTable) ExprMacroTable(org.apache.druid.math.expr.ExprMacroTable) Before(org.junit.Before)

Aggregations

PlannerConfig (org.apache.druid.sql.calcite.planner.PlannerConfig)11 DruidSchemaCatalog (org.apache.druid.sql.calcite.schema.DruidSchemaCatalog)10 PlannerFactory (org.apache.druid.sql.calcite.planner.PlannerFactory)8 ExprMacroTable (org.apache.druid.math.expr.ExprMacroTable)5 DruidOperatorTable (org.apache.druid.sql.calcite.planner.DruidOperatorTable)5 QueryRunnerFactoryConglomerate (org.apache.druid.query.QueryRunnerFactoryConglomerate)4 GeneratorSchemaInfo (org.apache.druid.segment.generator.GeneratorSchemaInfo)4 SegmentGenerator (org.apache.druid.segment.generator.SegmentGenerator)4 SpecificSegmentsQuerySegmentWalker (org.apache.druid.sql.calcite.util.SpecificSegmentsQuerySegmentWalker)4 DataSegment (org.apache.druid.timeline.DataSegment)4 LinearShardSpec (org.apache.druid.timeline.partition.LinearShardSpec)4 InetSocketAddress (java.net.InetSocketAddress)3 AbstractAvaticaHandler (org.apache.calcite.avatica.server.AbstractAvaticaHandler)3 QueryableIndex (org.apache.druid.segment.QueryableIndex)3 ServerConfig (org.apache.druid.server.initialization.ServerConfig)3 Before (org.junit.Before)3 Test (org.junit.Test)3 Setup (org.openjdk.jmh.annotations.Setup)3 ImmutableMap (com.google.common.collect.ImmutableMap)2 Connection (java.sql.Connection)2