public abstract class AbstractTableSchema extends Object implements org.apache.calcite.schema.Schema
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.| Modifier and Type | Field and Description |
|---|---|
protected static Set<String> |
EMPTY_NAMES |
| Constructor and Description |
|---|
AbstractTableSchema() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.calcite.linq4j.tree.Expression |
getExpression(org.apache.calcite.schema.SchemaPlus parentSchema,
String name) |
Set<String> |
getFunctionNames() |
Collection<org.apache.calcite.schema.Function> |
getFunctions(String name) |
org.apache.calcite.schema.Schema |
getSubSchema(String name) |
Set<String> |
getSubSchemaNames() |
org.apache.calcite.rel.type.RelProtoDataType |
getType(String name) |
Set<String> |
getTypeNames() |
boolean |
isMutable() |
org.apache.calcite.schema.Schema |
snapshot(org.apache.calcite.schema.SchemaVersion version) |
public org.apache.calcite.rel.type.RelProtoDataType getType(String name)
getType in interface org.apache.calcite.schema.Schemapublic Set<String> getTypeNames()
getTypeNames in interface org.apache.calcite.schema.Schemapublic Collection<org.apache.calcite.schema.Function> getFunctions(String name)
getFunctions in interface org.apache.calcite.schema.Schemapublic Set<String> getFunctionNames()
getFunctionNames in interface org.apache.calcite.schema.Schemapublic org.apache.calcite.schema.Schema getSubSchema(String name)
getSubSchema in interface org.apache.calcite.schema.Schemapublic Set<String> getSubSchemaNames()
getSubSchemaNames in interface org.apache.calcite.schema.Schemapublic org.apache.calcite.linq4j.tree.Expression getExpression(org.apache.calcite.schema.SchemaPlus parentSchema,
String name)
getExpression in interface org.apache.calcite.schema.Schemapublic boolean isMutable()
isMutable in interface org.apache.calcite.schema.Schemapublic org.apache.calcite.schema.Schema snapshot(org.apache.calcite.schema.SchemaVersion version)
snapshot in interface org.apache.calcite.schema.SchemaCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.