Class AbstractTableSchema
java.lang.Object
org.apache.druid.sql.calcite.schema.AbstractTableSchema
- All Implemented Interfaces:
org.apache.calcite.schema.Schema
- Direct Known Subclasses:
DruidSchema
public abstract class AbstractTableSchema
extends Object
implements org.apache.calcite.schema.Schema
Calcite provides two "schema" abstractions.
Schema is an interface,
while AbstractSchema is a base class
that "locks down" the Schema.getTable(java.lang.String) method to obtain the table from a
map. This forces the extensions of that class to materialize all tables in
the schema, so that Calcite can pick the one it wants. This class, by
contrast, provides the same defaults as AbstractSchema, but assumes
its subslasses will implement getTable() to directly look up that
one table, ignoring all others. Doing so lowers the cost of table resolution,
especially when the system has to fetch catalog information for the table:
we only fetch the information we need, not information for all tables.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.schema.Schema
org.apache.calcite.schema.Schema.TableType -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.calcite.linq4j.tree.ExpressiongetExpression(org.apache.calcite.schema.SchemaPlus parentSchema, String name) Collection<org.apache.calcite.schema.Function>getFunctions(String name) org.apache.calcite.schema.SchemagetSubSchema(String name) org.apache.calcite.rel.type.RelProtoDataTypebooleanorg.apache.calcite.schema.Schemasnapshot(org.apache.calcite.schema.SchemaVersion version) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.schema.Schema
getTable, getTableNames
-
Field Details
-
EMPTY_NAMES
-
-
Constructor Details
-
AbstractTableSchema
public AbstractTableSchema()
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceorg.apache.calcite.schema.Schema
-
getTypeNames
- Specified by:
getTypeNamesin interfaceorg.apache.calcite.schema.Schema
-
getFunctions
- Specified by:
getFunctionsin interfaceorg.apache.calcite.schema.Schema
-
getFunctionNames
- Specified by:
getFunctionNamesin interfaceorg.apache.calcite.schema.Schema
-
getSubSchema
- Specified by:
getSubSchemain interfaceorg.apache.calcite.schema.Schema
-
getSubSchemaNames
- Specified by:
getSubSchemaNamesin interfaceorg.apache.calcite.schema.Schema
-
getExpression
public org.apache.calcite.linq4j.tree.Expression getExpression(org.apache.calcite.schema.SchemaPlus parentSchema, String name) - Specified by:
getExpressionin interfaceorg.apache.calcite.schema.Schema
-
isMutable
public boolean isMutable()- Specified by:
isMutablein interfaceorg.apache.calcite.schema.Schema
-
snapshot
public org.apache.calcite.schema.Schema snapshot(org.apache.calcite.schema.SchemaVersion version) - Specified by:
snapshotin interfaceorg.apache.calcite.schema.Schema
-