Package org.apache.calcite.adapter.file
Class CsvTranslatableTable
java.lang.Object
org.apache.calcite.schema.impl.AbstractTable
org.apache.calcite.adapter.file.CsvTable
org.apache.calcite.adapter.file.CsvTranslatableTable
- All Implemented Interfaces:
QueryableTable,Table,TranslatableTable,Wrapper
Table based on a CSV file.
Copied from CsvTranslatableTable in demo CSV adapter,
with more advanced features.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.adapter.file.CsvTable
CsvTable.Flavor -
Field Summary
Fields inherited from class org.apache.calcite.adapter.file.CsvTable
protoRowType, source -
Method Summary
Modifier and TypeMethodDescription<T> Queryable<T>asQueryable(QueryProvider queryProvider, SchemaPlus schema, String tableName) Converts this table into aQueryable.Returns the element type of the collection that will implement this table.getExpression(SchemaPlus schema, String tableName, Class clazz) Generates an expression with which this table can be referenced in generated code.project(DataContext root, int[] fields) Returns an enumerable over a given projection of the fields.toRel(RelOptTable.ToRelContext context, RelOptTable relOptTable) Converts this table into arelational expression.toString()Methods inherited from class org.apache.calcite.adapter.file.CsvTable
getFieldTypes, getRowType, isStreamMethods inherited from class org.apache.calcite.schema.impl.AbstractTable
getJdbcTableType, getStatistic, isRolledUp, rolledUpColumnValidInsideAgg, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.calcite.schema.Table
getJdbcTableType, getRowType, getStatistic, isRolledUp, rolledUpColumnValidInsideAggMethods inherited from interface org.apache.calcite.schema.Wrapper
maybeUnwrap, unwrapOrThrow
-
Method Details
-
toString
-
project
Returns an enumerable over a given projection of the fields. -
getExpression
Description copied from interface:QueryableTableGenerates an expression with which this table can be referenced in generated code.- Specified by:
getExpressionin interfaceQueryableTable- Parameters:
schema- SchematableName- Table name (unique within schema)clazz- The desired collection class; for exampleQueryable.
-
getElementType
Description copied from interface:QueryableTableReturns the element type of the collection that will implement this table.- Specified by:
getElementTypein interfaceQueryableTable
-
asQueryable
public <T> Queryable<T> asQueryable(QueryProvider queryProvider, SchemaPlus schema, String tableName) Description copied from interface:QueryableTableConverts this table into aQueryable.- Specified by:
asQueryablein interfaceQueryableTable
-
toRel
Description copied from interface:TranslatableTableConverts this table into arelational expression.- Specified by:
toRelin interfaceTranslatableTable
-