Class CassandraSchema
java.lang.Object
org.apache.calcite.schema.impl.AbstractSchema
org.apache.calcite.adapter.cassandra.CassandraSchema
- All Implemented Interfaces:
Schema
Schema mapped onto a Cassandra column family.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.schema.impl.AbstractSchema
AbstractSchema.FactoryNested classes/interfaces inherited from interface org.apache.calcite.schema.Schema
Schema.TableType -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCassandraSchema(com.datastax.oss.driver.api.core.CqlSession session, SchemaPlus parentSchema, String name) Creates a Cassandra schema.CassandraSchema(com.datastax.oss.driver.api.core.CqlSession session, SchemaPlus parentSchema, String keyspace, String name) Creates a Cassandra schema. -
Method Summary
Modifier and TypeMethodDescriptiongetClusteringOrder(String columnFamily, boolean isView) Get the collation of all clustering key columns.Returns a map of tables in this schema by name.Methods inherited from class org.apache.calcite.schema.impl.AbstractSchema
getExpression, getFunctionMultimap, getFunctionNames, getFunctions, getSubSchema, getSubSchemaMap, getSubSchemaNames, getTable, getTableNames, getType, getTypeMap, getTypeNames, isMutable, snapshot, subSchemas, tables
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
CassandraSchema
public CassandraSchema(com.datastax.oss.driver.api.core.CqlSession session, SchemaPlus parentSchema, String name) Creates a Cassandra schema.- Parameters:
session- a Cassandra sessionparentSchema- the parent schemaname- the schema name
-
CassandraSchema
public CassandraSchema(com.datastax.oss.driver.api.core.CqlSession session, SchemaPlus parentSchema, String keyspace, String name) Creates a Cassandra schema.- Parameters:
session- a Cassandra sessionparentSchema- the parent schemakeyspace- the keyspace namename- the schema name
-
-
Method Details
-
getClusteringOrder
Get the collation of all clustering key columns.- Returns:
- A RelCollations representing the collation of all clustering keys
-
getTableMap
Description copied from class:AbstractSchemaReturns a map of tables in this schema by name.The implementations of
AbstractSchema.getTableNames()andAbstractSchema.getTable(String)depend on this map. The default implementation of this method returns the empty map. Override this method to change their behavior.- Overrides:
getTableMapin classAbstractSchema- Returns:
- Map of tables in this schema by name
-