Package org.apache.calcite.adapter.clone
Class CloneSchema
- java.lang.Object
-
- org.apache.calcite.schema.impl.AbstractSchema
-
- org.apache.calcite.adapter.clone.CloneSchema
-
- All Implemented Interfaces:
Schema
public class CloneSchema extends AbstractSchema
Schema that contains in-memory copies of tables from a JDBC schema.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CloneSchema.Factory
Schema factory that creates aCloneSchema
.-
Nested classes/interfaces inherited from interface org.apache.calcite.schema.Schema
Schema.TableType
-
-
Field Summary
Fields Modifier and Type Field Description private SchemaPlus
sourceSchema
-
Constructor Summary
Constructors Constructor Description CloneSchema(SchemaPlus sourceSchema)
Creates a CloneSchema.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> Table
createCloneTable(JavaTypeFactory typeFactory, RelProtoDataType protoRowType, java.util.List<org.apache.calcite.avatica.ColumnMetaData.Rep> repList, Enumerable<T> source)
Deprecated.static <T> Table
createCloneTable(JavaTypeFactory typeFactory, RelProtoDataType protoRowType, java.util.List<RelCollation> collations, java.util.List<org.apache.calcite.avatica.ColumnMetaData.Rep> repList, Enumerable<T> source)
private Table
createCloneTable(QueryProvider queryProvider, QueryableTable sourceTable, java.lang.String name)
protected java.util.Map<java.lang.String,Table>
getTableMap()
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 Detail
-
sourceSchema
private final SchemaPlus sourceSchema
-
-
Constructor Detail
-
CloneSchema
public CloneSchema(SchemaPlus sourceSchema)
Creates a CloneSchema.- Parameters:
sourceSchema
- JDBC data source
-
-
Method Detail
-
getTableMap
protected java.util.Map<java.lang.String,Table> 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
-
createCloneTable
private Table createCloneTable(QueryProvider queryProvider, QueryableTable sourceTable, java.lang.String name)
-
createCloneTable
@Deprecated public static <T> Table createCloneTable(JavaTypeFactory typeFactory, RelProtoDataType protoRowType, java.util.List<org.apache.calcite.avatica.ColumnMetaData.Rep> repList, Enumerable<T> source)
Deprecated.
-
createCloneTable
public static <T> Table createCloneTable(JavaTypeFactory typeFactory, RelProtoDataType protoRowType, java.util.List<RelCollation> collations, java.util.List<org.apache.calcite.avatica.ColumnMetaData.Rep> repList, Enumerable<T> source)
-
-