Package org.apache.calcite.adapter.csv
Class CsvTranslatableTable
- java.lang.Object
-
- org.apache.calcite.schema.impl.AbstractTable
-
- org.apache.calcite.adapter.csv.CsvTable
-
- org.apache.calcite.adapter.csv.CsvTranslatableTable
-
- All Implemented Interfaces:
QueryableTable
,Table
,TranslatableTable
,Wrapper
public class CsvTranslatableTable extends CsvTable implements QueryableTable, TranslatableTable
Table based on a CSV file.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.calcite.adapter.csv.CsvTable
CsvTable.Flavor
-
-
Field Summary
-
Fields inherited from class org.apache.calcite.adapter.csv.CsvTable
fieldTypes, protoRowType, source
-
-
Constructor Summary
Constructors Constructor Description CsvTranslatableTable(Source source, RelProtoDataType protoRowType)
Creates a CsvTable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Queryable<T>
asQueryable(QueryProvider queryProvider, SchemaPlus schema, java.lang.String tableName)
Converts this table into aQueryable
.java.lang.reflect.Type
getElementType()
Returns the element type of the collection that will implement this table.Expression
getExpression(SchemaPlus schema, java.lang.String tableName, java.lang.Class clazz)
Generates an expression with which this table can be referenced in generated code.Enumerable<java.lang.Object>
project(DataContext root, int[] fields)
Returns an enumerable over a given projection of the fields.RelNode
toRel(RelOptTable.ToRelContext context, RelOptTable relOptTable)
Converts this table into arelational expression
.java.lang.String
toString()
-
Methods inherited from class org.apache.calcite.adapter.csv.CsvTable
getRowType
-
Methods inherited from class org.apache.calcite.schema.impl.AbstractTable
getJdbcTableType, getStatistic, isRolledUp, rolledUpColumnValidInsideAgg, unwrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.calcite.schema.Table
getJdbcTableType, getRowType, getStatistic, isRolledUp, rolledUpColumnValidInsideAgg
-
-
-
-
Constructor Detail
-
CsvTranslatableTable
CsvTranslatableTable(Source source, RelProtoDataType protoRowType)
Creates a CsvTable.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
project
public Enumerable<java.lang.Object> project(DataContext root, int[] fields)
Returns an enumerable over a given projection of the fields.Called from generated code.
-
getExpression
public Expression getExpression(SchemaPlus schema, java.lang.String tableName, java.lang.Class clazz)
Description copied from interface:QueryableTable
Generates an expression with which this table can be referenced in generated code.- Specified by:
getExpression
in interfaceQueryableTable
- Parameters:
schema
- SchematableName
- Table name (unique within schema)clazz
- The desired collection class; for exampleQueryable
.
-
getElementType
public java.lang.reflect.Type getElementType()
Description copied from interface:QueryableTable
Returns the element type of the collection that will implement this table.- Specified by:
getElementType
in interfaceQueryableTable
-
asQueryable
public <T> Queryable<T> asQueryable(QueryProvider queryProvider, SchemaPlus schema, java.lang.String tableName)
Description copied from interface:QueryableTable
Converts this table into aQueryable
.- Specified by:
asQueryable
in interfaceQueryableTable
-
toRel
public RelNode toRel(RelOptTable.ToRelContext context, RelOptTable relOptTable)
Description copied from interface:TranslatableTable
Converts this table into arelational expression
.- Specified by:
toRel
in interfaceTranslatableTable
-
-