Search in sources :

Example 1 with SqlResource

use of io.druid.sql.http.SqlResource 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

DruidOperatorTable (io.druid.sql.calcite.planner.DruidOperatorTable)1 PlannerConfig (io.druid.sql.calcite.planner.PlannerConfig)1 PlannerFactory (io.druid.sql.calcite.planner.PlannerFactory)1 SqlResource (io.druid.sql.http.SqlResource)1 SchemaPlus (org.apache.calcite.schema.SchemaPlus)1 Before (org.junit.Before)1