Package org.apache.calcite.schema
Interface ModifiableView
-
- All Superinterfaces:
Table
- All Known Implementing Classes:
ModifiableViewTable
public interface ModifiableView extends Table
A modifiable view ontoModifiableTable
.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.-
Methods inherited from interface org.apache.calcite.schema.Table
getJdbcTableType, getRowType, getStatistic, isRolledUp, rolledUpColumnValidInsideAgg
-
-
-
-
Method Detail
-
getConstraint
RexNode getConstraint(RexBuilder rexBuilder, RelDataType tableRowType)
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 thei
th 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.
-
-