public class ModifiableViewTable extends ViewTable implements ModifiableView, Wrapper
ViewTable that is modifiable.elementType| Constructor and Description |
|---|
ModifiableViewTable(Type elementType,
RelProtoDataType rowType,
String viewSql,
List<String> schemaPath,
@Nullable List<String> viewPath,
Table table,
Path tablePath,
RexNode constraint,
ImmutableIntList columnMapping)
Creates a ModifiableViewTable.
|
| Modifier and Type | Method and Description |
|---|---|
ModifiableViewTable |
extend(List<RelDataTypeField> extendedColumns,
RelDataTypeFactory typeFactory)
Extends the underlying table and returns a new view with updated row-type
and column-mapping.
|
protected ModifiableViewTable |
extend(Table extendedTable,
RelProtoDataType protoRowType,
ImmutableIntList newColumnMapping) |
ImmutableIntList |
getColumnMapping()
Returns the column mapping onto another table.
|
RexNode |
getConstraint(RexBuilder rexBuilder,
RelDataType tableRowType)
Returns a constraint that each candidate row must satisfy.
|
Table |
getTable()
Returns the underlying table.
|
Path |
getTablePath()
Returns the full path of the underlying table.
|
<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.
|
asQueryable, getJdbcTableType, getRowType, getSchemaPath, getViewPath, getViewSql, toRel, viewMacro, viewMacro, viewMacrogetElementType, getExpressiongetStatistic, isRolledUp, rolledUpColumnValidInsideAggclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetJdbcTableType, getRowType, getStatistic, isRolledUp, rolledUpColumnValidInsideAggmaybeUnwrap, unwrapOrThrowpublic RexNode getConstraint(RexBuilder rexBuilder, RelDataType tableRowType)
ModifiableViewNever null; if there is no constraint, returns "true".
getConstraint in interface ModifiableViewrexBuilder - Rex buildertableRowType - Row type of the table that this view maps ontopublic ImmutableIntList getColumnMapping()
ModifiableViewmapping[i] contains the column of the underlying table that the
ith column of the view comes from, or -1 if it is based on an
expression.
getColumnMapping in interface ModifiableViewpublic Table getTable()
ModifiableViewgetTable in interface ModifiableViewpublic Path getTablePath()
ModifiableViewgetTablePath in interface ModifiableViewpublic <C> C unwrap(Class<C> aClass)
Wrapperunwrap in interface Wrapperunwrap in class AbstractTablepublic final ModifiableViewTable extend(List<RelDataTypeField> extendedColumns, RelDataTypeFactory typeFactory)
The type factory is used to perform some scratch calculations, viz the type mapping, but the "real" row-type will be assigned later, when the table has been bound to the statement's type factory. The is important, because adding types to type factories that do not belong to a statement could potentially leak memory.
extendedColumns - Extended fieldstypeFactory - Type factoryprotected ModifiableViewTable extend(Table extendedTable, RelProtoDataType protoRowType, ImmutableIntList newColumnMapping)
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.