Search in sources :

Example 6 with PlannerFactory

use of io.druid.sql.calcite.planner.PlannerFactory in project druid by druid-io.

the class SqlResourceTest method setUp.

@Before
public void setUp() throws Exception {
    Calcites.setSystemProperties();
    walker = CalciteTests.createMockWalker(temporaryFolder.newFolder());
    final PlannerConfig plannerConfig = new PlannerConfig();
    final SchemaPlus rootSchema = Calcites.createRootSchema(CalciteTests.createMockSchema(walker, plannerConfig));
    final DruidOperatorTable operatorTable = CalciteTests.createOperatorTable();
    resource = new SqlResource(JSON_MAPPER, new PlannerFactory(rootSchema, walker, operatorTable, plannerConfig));
}
Also used : PlannerConfig(io.druid.sql.calcite.planner.PlannerConfig) SchemaPlus(org.apache.calcite.schema.SchemaPlus) SqlResource(io.druid.sql.http.SqlResource) PlannerFactory(io.druid.sql.calcite.planner.PlannerFactory) DruidOperatorTable(io.druid.sql.calcite.planner.DruidOperatorTable) Before(org.junit.Before)

Aggregations

PlannerConfig (io.druid.sql.calcite.planner.PlannerConfig)6 PlannerFactory (io.druid.sql.calcite.planner.PlannerFactory)6 DruidOperatorTable (io.druid.sql.calcite.planner.DruidOperatorTable)5 SchemaPlus (org.apache.calcite.schema.SchemaPlus)5 Before (org.junit.Before)4 AggregatorFactory (io.druid.query.aggregation.AggregatorFactory)2 CountAggregatorFactory (io.druid.query.aggregation.CountAggregatorFactory)2 QueryableIndex (io.druid.segment.QueryableIndex)2 SpecificSegmentsQuerySegmentWalker (io.druid.sql.calcite.util.SpecificSegmentsQuerySegmentWalker)2 LinearShardSpec (io.druid.timeline.partition.LinearShardSpec)2 BenchmarkDataGenerator (io.druid.benchmark.datagen.BenchmarkDataGenerator)1 BenchmarkSchemaInfo (io.druid.benchmark.datagen.BenchmarkSchemaInfo)1 InputRow (io.druid.data.input.InputRow)1 QueryRunnerFactoryConglomerate (io.druid.query.QueryRunnerFactoryConglomerate)1 TableDataSource (io.druid.query.TableDataSource)1 DoubleSumAggregatorFactory (io.druid.query.aggregation.DoubleSumAggregatorFactory)1 FilteredAggregatorFactory (io.druid.query.aggregation.FilteredAggregatorFactory)1 ApproximateHistogramAggregatorFactory (io.druid.query.aggregation.histogram.ApproximateHistogramAggregatorFactory)1 ApproximateHistogramDruidModule (io.druid.query.aggregation.histogram.ApproximateHistogramDruidModule)1 ApproximateHistogramFoldingAggregatorFactory (io.druid.query.aggregation.histogram.ApproximateHistogramFoldingAggregatorFactory)1