Package org.apache.calcite.schema.impl
Class AbstractTable
- java.lang.Object
-
- org.apache.calcite.schema.impl.AbstractTable
-
- Direct Known Subclasses:
AbstractQueryableTable
,CsvTable
,DruidTable
,GeodeSimpleScannableTable
,JsonTable
,MazeTable
,PigTable
,SqlCreateTable.AbstractModifiableTable
,StarTable
public abstract class AbstractTable extends java.lang.Object implements Table, Wrapper
Abstract base class for implementingTable
.Sub-classes should override
isRolledUp(java.lang.String)
andTable.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 Summary
Constructors Modifier Constructor Description protected
AbstractTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Schema.TableType
getJdbcTableType()
Type of table.Statistic
getStatistic()
Returns a provider of statistics about this table.boolean
isRolledUp(java.lang.String column)
Determines whether the givencolumn
has been rolled up.boolean
rolledUpColumnValidInsideAgg(java.lang.String column, SqlCall call, SqlNode parent, CalciteConnectionConfig config)
Determines whether the given rolled up column can be used inside the given aggregate function.<C> C
unwrap(java.lang.Class<C> aClass)
Finds an instance of an interface implemented by this object, or returns null if this object does not support that interface.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.calcite.schema.Table
getRowType
-
-
-
-
Method Detail
-
getStatistic
public Statistic getStatistic()
Description copied from interface:Table
Returns a provider of statistics about this table.- Specified by:
getStatistic
in interfaceTable
-
getJdbcTableType
public Schema.TableType getJdbcTableType()
Description copied from interface:Table
Type of table.- Specified by:
getJdbcTableType
in interfaceTable
-
unwrap
public <C> C unwrap(java.lang.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.
-
isRolledUp
public boolean isRolledUp(java.lang.String column)
Description copied from interface:Table
Determines whether the givencolumn
has been rolled up.- Specified by:
isRolledUp
in interfaceTable
-
rolledUpColumnValidInsideAgg
public boolean rolledUpColumnValidInsideAgg(java.lang.String column, SqlCall call, SqlNode parent, 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 thatisRolledUp(column)
istrue
.- Specified by:
rolledUpColumnValidInsideAgg
in interfaceTable
- Parameters:
column
- The column name for whichisRolledUp
is truecall
- The aggregate callparent
- Parent node ofcall
in theSqlNode
treeconfig
- Config settings. May be null- Returns:
- true iff the given aggregate call is valid
-
-