Package org.apache.calcite.schema
Interface ModifiableView
- All Superinterfaces:
Table
- All Known Implementing Classes:
AbstractModifiableView,MockCatalogReader.MockModifiableViewRelOptTable.MockModifiableViewTable,ModifiableViewTable
A modifiable view onto
ModifiableTable.
It describes how its columns map onto the underlying table's columns, and any constraints that incoming rows must satisfy.
For example, given
CREATE TABLE emps (empno INTEGER, gender VARCHAR(1), deptno INTEGER);
CREATE VIEW female_emps AS
SELECT empno, deptno FROM emps WHERE gender = 'F';
constraint is $1 = 'F'
and column mapping is [0, 2].
NOTE: The current API is inefficient and experimental. It will change without notice.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the column mapping onto another table.getConstraint(RexBuilder rexBuilder, RelDataType tableRowType) Returns a constraint that each candidate row must satisfy.getTable()Returns the underlying table.Returns the full path of the underlying table.Methods inherited from interface org.apache.calcite.schema.Table
getJdbcTableType, getRowType, getStatistic, isRolledUp, rolledUpColumnValidInsideAgg
-
Method Details
-
getConstraint
Returns a constraint that each candidate row must satisfy.Never null; if there is no constraint, returns "true".
- Parameters:
rexBuilder- Rex buildertableRowType- Row type of the table that this view maps onto
-
getColumnMapping
ImmutableIntList getColumnMapping()Returns the column mapping onto another table.mapping[i]contains the column of the underlying table that theith column of the view comes from, or -1 if it is based on an expression. -
getTable
Table getTable()Returns the underlying table. -
getTablePath
Path getTablePath()Returns the full path of the underlying table.
-