Interface RelOptTable

All Superinterfaces:
Wrapper
All Known Subinterfaces:
Prepare.PreparingTable
All Known Implementing Classes:
MockCatalogReader.MockModifiableViewRelOptTable, MockCatalogReader.MockRelViewTable, MockCatalogReader.MockTable, MockCatalogReader.MockViewTable, MockCatalogReader.MustFilterMockTable, Prepare.AbstractPreparingTable, RelOptAbstractTable, RelOptTableImpl

public interface RelOptTable extends Wrapper
Represents a relational dataset in a RelOptSchema. It has methods to describe and implement itself.
  • Method Details

    • getQualifiedName

      List<String> getQualifiedName()
      Obtains an identifier for this table. The identifier must be unique with respect to the Connection producing this table.
      Returns:
      qualified name
    • getRowCount

      double getRowCount()
      Returns an estimate of the number of rows in the table.
    • getRowType

      RelDataType getRowType()
      Describes the type of rows returned by this table.
    • getRelOptSchema

      @Nullable RelOptSchema getRelOptSchema()
      Returns the RelOptSchema this table belongs to.
    • toRel

      Converts this table into a relational expression.

      The planner calls this method to convert a table into an initial relational expression, generally something abstract, such as a LogicalTableScan, then optimizes this expression by applying rules to transform it into more efficient access methods for this table.

    • getCollationList

      @Nullable List<RelCollation> getCollationList()
      Returns a description of the physical ordering (or orderings) of the rows returned from this table.
      See Also:
    • getDistribution

      @Nullable RelDistribution getDistribution()
      Returns a description of the physical distribution of the rows in this table.
      See Also:
    • isKey

      boolean isKey(ImmutableBitSet columns)
      Returns whether the given columns are a key or a superset of a unique key of this table.
      Parameters:
      columns - Ordinals of key columns
      Returns:
      Whether the given columns are a key or a superset of a key
    • getKeys

      @Nullable List<ImmutableBitSet> getKeys()
      Returns a list of unique keys, empty list if no key exist, the result should be consistent with isKey.
    • getReferentialConstraints

      @Nullable List<RelReferentialConstraint> getReferentialConstraints()
      Returns the referential constraints existing for this table. These constraints are represented over other tables using RelReferentialConstraint nodes.
    • getExpression

      @Nullable Expression getExpression(Class clazz)
      Generates code for this table.
      Parameters:
      clazz - The desired collection class; for example Queryable.
      Returns:
      the code for the table, or null if code generation is not supported
    • extend

      RelOptTable extend(List<RelDataTypeField> extendedFields)
      Returns a table with the given extra fields.

      The extended table includes the fields of this base table plus the extended fields that do not have the same name as a field in the base table.

    • getColumnStrategies

      List<ColumnStrategy> getColumnStrategies()
      Returns a list describing how each column is populated. The list has the same number of entries as there are fields, and is immutable.