Class RelOptAbstractTable

java.lang.Object
org.apache.calcite.plan.RelOptAbstractTable
All Implemented Interfaces:
RelOptTable, Wrapper

public abstract class RelOptAbstractTable extends Object implements RelOptTable
Partial implementation of RelOptTable.
  • Field Details

  • Constructor Details

  • Method Details

    • getName

      public String getName()
    • getQualifiedName

      public List<String> getQualifiedName()
      Description copied from interface: RelOptTable
      Obtains an identifier for this table. The identifier must be unique with respect to the Connection producing this table.
      Specified by:
      getQualifiedName in interface RelOptTable
      Returns:
      qualified name
    • getRowCount

      public double getRowCount()
      Description copied from interface: RelOptTable
      Returns an estimate of the number of rows in the table.
      Specified by:
      getRowCount in interface RelOptTable
    • getRowType

      public RelDataType getRowType()
      Description copied from interface: RelOptTable
      Describes the type of rows returned by this table.
      Specified by:
      getRowType in interface RelOptTable
    • getRelOptSchema

      public RelOptSchema getRelOptSchema()
      Description copied from interface: RelOptTable
      Returns the RelOptSchema this table belongs to.
      Specified by:
      getRelOptSchema in interface RelOptTable
    • getCollationList

      public @Nullable List<RelCollation> getCollationList()
      Description copied from interface: RelOptTable
      Returns a description of the physical ordering (or orderings) of the rows returned from this table.
      Specified by:
      getCollationList in interface RelOptTable
      See Also:
    • getDistribution

      public @Nullable RelDistribution getDistribution()
      Description copied from interface: RelOptTable
      Returns a description of the physical distribution of the rows in this table.
      Specified by:
      getDistribution in interface RelOptTable
      See Also:
    • unwrap

      public <T> @Nullable T unwrap(Class<T> clazz)
      Description copied from interface: Wrapper
      Finds an instance of an interface implemented by this object, or returns null if this object does not support that interface.
      Specified by:
      unwrap in interface Wrapper
    • isKey

      public boolean isKey(ImmutableBitSet columns)
      Description copied from interface: RelOptTable
      Returns whether the given columns are a key or a superset of a unique key of this table.
      Specified by:
      isKey in interface RelOptTable
      Parameters:
      columns - Ordinals of key columns
      Returns:
      Whether the given columns are a key or a superset of a key
    • getKeys

      public @Nullable List<ImmutableBitSet> getKeys()
      Description copied from interface: RelOptTable
      Returns a list of unique keys, empty list if no key exist, the result should be consistent with isKey.
      Specified by:
      getKeys in interface RelOptTable
    • getReferentialConstraints

      public @Nullable List<RelReferentialConstraint> getReferentialConstraints()
      Description copied from interface: RelOptTable
      Returns the referential constraints existing for this table. These constraints are represented over other tables using RelReferentialConstraint nodes.
      Specified by:
      getReferentialConstraints in interface RelOptTable
    • toRel

      public RelNode toRel(RelOptTable.ToRelContext context)
      Description copied from interface: RelOptTable
      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.

      Specified by:
      toRel in interface RelOptTable
    • getExpression

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

      public RelOptTable extend(List<RelDataTypeField> extendedFields)
      Description copied from interface: RelOptTable
      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.

      Specified by:
      extend in interface RelOptTable
    • getColumnStrategies

      public List<ColumnStrategy> getColumnStrategies()
      Description copied from interface: RelOptTable
      Returns a list describing how each column is populated. The list has the same number of entries as there are fields, and is immutable.
      Specified by:
      getColumnStrategies in interface RelOptTable