Package org.apache.calcite.adapter.kafka
Class KafkaStreamTable
java.lang.Object
org.apache.calcite.adapter.kafka.KafkaStreamTable
- All Implemented Interfaces:
ScannableTable
,StreamableTable
,Table
A table that maps to an Apache Kafka topic.
Currently only KafkaStreamTable
is
implemented as a STREAM table.
-
Method Summary
Modifier and TypeMethodDescriptionType of table.getRowType
(RelDataTypeFactory typeFactory) Returns this table's row type.Returns a provider of statistics about this table.boolean
isRolledUp
(String column) Determines whether the givencolumn
has been rolled up.boolean
rolledUpColumnValidInsideAgg
(String column, SqlCall call, @Nullable SqlNode parent, @Nullable CalciteConnectionConfig config) Determines whether the given rolled up column can be used inside the given aggregate function.Enumerable<@Nullable Object[]>
scan
(DataContext root) Returns an enumerator over the rows in this Table.stream()
Returns an enumerator over the rows in this Table.
-
Method Details
-
scan
Description copied from interface:ScannableTable
Returns an enumerator over the rows in this Table. Each row is represented as an array of its column values.- Specified by:
scan
in interfaceScannableTable
-
getRowType
Description copied from interface:Table
Returns this table's row type.This is a struct type whose fields describe the names and types of the columns in this table.
The implementer must use the type factory provided. This ensures that the type is converted into a canonical form; other equal types in the same query will use the same object.
- Specified by:
getRowType
in interfaceTable
- Parameters:
typeFactory
- Type factory with which to create the type- Returns:
- Row type
-
getStatistic
Description copied from interface:Table
Returns a provider of statistics about this table.- Specified by:
getStatistic
in interfaceTable
-
isRolledUp
Description copied from interface:Table
Determines whether the givencolumn
has been rolled up.- Specified by:
isRolledUp
in interfaceTable
-
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 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
-
stream
Description copied from interface:StreamableTable
Returns an enumerator over the rows in this Table. Each row is represented as an array of its column values.- Specified by:
stream
in interfaceStreamableTable
-
getJdbcTableType
Description copied from interface:Table
Type of table.- Specified by:
getJdbcTableType
in interfaceTable
-