Class AbstractTable

All Implemented Interfaces:
Table, Wrapper
Direct Known Subclasses:
AbstractModifiableTable, AbstractModifiableView, AbstractQueryableTable, CsvTable, CsvTable, DruidTable, GeodeSimpleScannableTable, JsonTable, MazeTable, PigTable, PigTable, RedisTable, Smalls.MazeTable, StarTable

public abstract class AbstractTable extends Object implements Table, Wrapper
Abstract base class for implementing Table.

Sub-classes should override isRolledUp(java.lang.String) and Table.rolledUpColumnValidInsideAgg(String, SqlCall, SqlNode, CalciteConnectionConfig) if their table can potentially contain rolled up values. This information is used by the validator to check for illegal uses of these columns.

  • Constructor Details

    • AbstractTable

      protected AbstractTable()
  • Method Details

    • getStatistic

      public Statistic getStatistic()
      Description copied from interface: Table
      Returns a provider of statistics about this table.
      Specified by:
      getStatistic in interface Table
    • getJdbcTableType

      public Schema.TableType getJdbcTableType()
      Description copied from interface: Table
      Type of table.
      Specified by:
      getJdbcTableType in interface Table
    • unwrap

      public <C> @Nullable C unwrap(Class<C> aClass)
      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
    • isRolledUp

      public boolean isRolledUp(String column)
      Description copied from interface: Table
      Determines whether the given column has been rolled up.
      Specified by:
      isRolledUp in interface Table
    • rolledUpColumnValidInsideAgg

      public boolean rolledUpColumnValidInsideAgg(String column, SqlCall call, @Nullable SqlNode parent, @Nullable CalciteConnectionConfig config)
      Description copied from interface: Table
      Determines whether the given rolled up column can be used inside the given aggregate function. You can assume that isRolledUp(column) is true.
      Specified by:
      rolledUpColumnValidInsideAgg in interface Table
      column - The column name for which isRolledUp is true
      call - The aggregate call
      parent - Parent node of call in the SqlNode tree
      config - Config settings. May be null
      true iff the given aggregate call is valid