public class JdbcTable extends AbstractQueryableTable implements TranslatableTable, ScannableTable, ModifiableTable
The idea is not to read the whole table, however. The idea is to use
this as a building block for a query, by applying Queryable operators
such as
ExtendedEnumerable.where(org.apache.calcite.linq4j.function.Predicate2).
The resulting queryable can then be converted to a SQL query, which can be
executed efficiently on the JDBC server.
| Modifier and Type | Field and Description |
|---|---|
String |
jdbcCatalogName |
JdbcSchema |
jdbcSchema |
String |
jdbcSchemaName |
String |
jdbcTableName |
Schema.TableType |
jdbcTableType |
elementType| Modifier and Type | Method and Description |
|---|---|
<T> org.apache.calcite.linq4j.Queryable<T> |
asQueryable(org.apache.calcite.linq4j.QueryProvider queryProvider,
SchemaPlus schema,
String tableName)
Converts this table into a
Queryable. |
Schema.TableType |
getJdbcTableType()
Type of table.
|
@Nullable Collection |
getModifiableCollection()
Returns the modifiable collection.
|
RelDataType |
getRowType(RelDataTypeFactory typeFactory)
Returns this table's row type.
|
org.apache.calcite.linq4j.Enumerable<Object[]> |
scan(DataContext root)
Returns an enumerator over the rows in this Table.
|
SqlIdentifier |
tableName()
Returns the table name, qualified with catalog and schema name if
applicable, as a parse tree node (
SqlIdentifier). |
TableModify |
toModificationRel(RelOptCluster cluster,
RelOptTable table,
Prepare.CatalogReader catalogReader,
RelNode input,
TableModify.Operation operation,
@Nullable List<String> updateColumnList,
@Nullable List<RexNode> sourceExpressionList,
boolean flattened)
Creates a relational expression that modifies this table.
|
RelNode |
toRel(RelOptTable.ToRelContext context,
RelOptTable relOptTable)
Converts this table into a
relational expression. |
String |
toString() |
<C> C |
unwrap(Class<C> aClass)
Finds an instance of an interface implemented by this object,
or returns null if this object does not support that interface.
|
getElementType, getExpressiongetStatistic, isRolledUp, rolledUpColumnValidInsideAggclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetElementType, getExpressiongetStatistic, isRolledUp, rolledUpColumnValidInsideAggmaybeUnwrap, unwrapOrThrowpublic final JdbcSchema jdbcSchema
public final String jdbcCatalogName
public final String jdbcSchemaName
public final String jdbcTableName
public final Schema.TableType jdbcTableType
public Schema.TableType getJdbcTableType()
TablegetJdbcTableType in interface TablegetJdbcTableType in class AbstractTablepublic <C> C unwrap(Class<C> aClass)
Wrapperunwrap in interface Wrapperunwrap in class AbstractTablepublic RelDataType getRowType(RelDataTypeFactory typeFactory)
TableThis is a struct type whose fields describe the names and types of the columns in this table.
The implementer must use the type factory provided. This ensures that the type is converted into a canonical form; other equal types in the same query will use the same object.
getRowType in interface TabletypeFactory - Type factory with which to create the typepublic SqlIdentifier tableName()
SqlIdentifier).public RelNode toRel(RelOptTable.ToRelContext context, RelOptTable relOptTable)
TranslatableTablerelational expression.toRel in interface TranslatableTablepublic <T> org.apache.calcite.linq4j.Queryable<T> asQueryable(org.apache.calcite.linq4j.QueryProvider queryProvider,
SchemaPlus schema,
String tableName)
QueryableTableQueryable.asQueryable in interface QueryableTablepublic org.apache.calcite.linq4j.Enumerable<Object[]> scan(DataContext root)
ScannableTablescan in interface ScannableTablepublic @Nullable Collection getModifiableCollection()
ModifiableTablegetModifiableCollection in interface ModifiableTablepublic TableModify toModificationRel(RelOptCluster cluster, RelOptTable table, Prepare.CatalogReader catalogReader, RelNode input, TableModify.Operation operation, @Nullable List<String> updateColumnList, @Nullable List<RexNode> sourceExpressionList, boolean flattened)
ModifiableTabletoModificationRel in interface ModifiableTableCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.