Search in sources :

Example 1 with CassandraSchema

use of org.apache.calcite.adapter.cassandra.CassandraSchema in project drill by apache.

the class CassandraRootDrillSchema method createSubSchema.

private Schema createSubSchema(String schemaName) {
    Map<String, Object> configs = new HashMap<>(configMap);
    configs.put("keyspace", schemaName);
    SchemaPlus parentSchema = parent.getSubSchema(parentName);
    Schema schema = new CassandraDrillSchema(schemaName, plugin, (CassandraSchema) schemaFactory.create(parentSchema, schemaName, configs));
    parentSchema.add(schemaName, schema);
    return schema;
}
Also used : ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) CassandraSchema(org.apache.calcite.adapter.cassandra.CassandraSchema) AbstractSchema(org.apache.drill.exec.store.AbstractSchema) Schema(org.apache.calcite.schema.Schema) SchemaPlus(org.apache.calcite.schema.SchemaPlus)

Aggregations

HashMap (java.util.HashMap)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 CassandraSchema (org.apache.calcite.adapter.cassandra.CassandraSchema)1 Schema (org.apache.calcite.schema.Schema)1 SchemaPlus (org.apache.calcite.schema.SchemaPlus)1 AbstractSchema (org.apache.drill.exec.store.AbstractSchema)1