Interface ModifiableView

All Superinterfaces:
Table
All Known Implementing Classes:
ModifiableViewTable

public interface ModifiableView
extends Table
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 Details

    • 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 builder
      tableRowType - 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 the ith 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.