public class ListTransientTable extends AbstractQueryableTable implements TransientTable, ModifiableTable, ScannableTable
TransientTable backed by a Java list. It will be automatically added to the
current schema when scan(DataContext) method gets called.
NOTE: The current API is experimental and subject to change without notice.
elementType| Constructor and Description |
|---|
ListTransientTable(String name,
RelDataType rowType) |
| 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. |
Type |
getElementType()
Returns the element type of the collection that will implement this
table.
|
org.apache.calcite.linq4j.tree.Expression |
getExpression(SchemaPlus schema,
String tableName,
Class clazz)
Generates an expression with which this table can be referenced in
generated code.
|
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.
|
TableModify |
toModificationRel(RelOptCluster cluster,
RelOptTable table,
Prepare.CatalogReader catalogReader,
RelNode child,
TableModify.Operation operation,
@Nullable List<String> updateColumnList,
@Nullable List<RexNode> sourceExpressionList,
boolean flattened)
Creates a relational expression that modifies this table.
|
getJdbcTableType, getStatistic, isRolledUp, rolledUpColumnValidInsideAgg, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetJdbcTableType, getStatistic, isRolledUp, rolledUpColumnValidInsideAggmaybeUnwrap, unwrapOrThrowpublic ListTransientTable(String name, RelDataType rowType)
public TableModify toModificationRel(RelOptCluster cluster, RelOptTable table, Prepare.CatalogReader catalogReader, RelNode child, TableModify.Operation operation, @Nullable List<String> updateColumnList, @Nullable List<RexNode> sourceExpressionList, boolean flattened)
ModifiableTabletoModificationRel in interface ModifiableTablepublic Collection getModifiableCollection()
ModifiableTablegetModifiableCollection in interface ModifiableTablepublic org.apache.calcite.linq4j.Enumerable<Object[]> scan(DataContext root)
ScannableTablescan in interface ScannableTablepublic org.apache.calcite.linq4j.tree.Expression getExpression(SchemaPlus schema, String tableName, Class clazz)
QueryableTablegetExpression in interface QueryableTablegetExpression in class AbstractQueryableTableschema - SchematableName - Table name (unique within schema)clazz - The desired collection class; for example Queryable.public <T> org.apache.calcite.linq4j.Queryable<T> asQueryable(org.apache.calcite.linq4j.QueryProvider queryProvider,
SchemaPlus schema,
String tableName)
QueryableTableQueryable.asQueryable in interface QueryableTablepublic 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 Type getElementType()
QueryableTablegetElementType in interface QueryableTablegetElementType in class AbstractQueryableTableCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.