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.Factory
Nested classes/interfaces inherited from interface org.apache.calcite.schema.Schema
Schema.TableType
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCassandraSchema
(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
-
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:AbstractSchema
Returns 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:
getTableMap
in classAbstractSchema
- Returns:
- Map of tables in this schema by name
-