public class FlowFileTable
extends org.apache.calcite.schema.impl.AbstractTable
implements org.apache.calcite.schema.QueryableTable, org.apache.calcite.schema.TranslatableTable
Modifier and Type | Field and Description |
---|---|
private Set<FlowFileEnumerator> |
enumerators |
private FlowFile |
flowFile |
private ComponentLog |
logger |
private int |
maxRecordsRead |
private RecordReaderFactory |
recordReaderFactory |
private RecordSchema |
recordSchema |
private org.apache.calcite.rel.type.RelDataType |
relDataType |
private ProcessSession |
session |
Constructor and Description |
---|
FlowFileTable(ProcessSession session,
FlowFile flowFile,
RecordSchema schema,
RecordReaderFactory recordReaderFactory,
ComponentLog logger)
Creates a FlowFile table.
|
Modifier and Type | Method and Description |
---|---|
<T> org.apache.calcite.linq4j.Queryable<T> |
asQueryable(org.apache.calcite.linq4j.QueryProvider queryProvider,
org.apache.calcite.schema.SchemaPlus schema,
String tableName) |
void |
close() |
Type |
getElementType() |
org.apache.calcite.linq4j.tree.Expression |
getExpression(org.apache.calcite.schema.SchemaPlus schema,
String tableName,
Class clazz) |
org.apache.calcite.schema.Schema.TableType |
getJdbcTableType() |
int |
getRecordsRead() |
private org.apache.calcite.rel.type.RelDataType |
getRelDataType(DataType fieldType,
org.apache.calcite.adapter.java.JavaTypeFactory typeFactory) |
org.apache.calcite.rel.type.RelDataType |
getRowType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory) |
private boolean |
isNumeric(DataType dataType) |
org.apache.calcite.linq4j.Enumerable<Object> |
project(int[] fields)
Returns an enumerable over a given projection of the fields.
|
void |
setFlowFile(ProcessSession session,
FlowFile flowFile) |
org.apache.calcite.rel.RelNode |
toRel(org.apache.calcite.plan.RelOptTable.ToRelContext context,
org.apache.calcite.plan.RelOptTable relOptTable) |
String |
toString() |
getStatistic, isRolledUp, rolledUpColumnValidInsideAgg, unwrap
private final RecordReaderFactory recordReaderFactory
private final ComponentLog logger
private RecordSchema recordSchema
private org.apache.calcite.rel.type.RelDataType relDataType
private volatile ProcessSession session
private volatile FlowFile flowFile
private volatile int maxRecordsRead
private final Set<FlowFileEnumerator> enumerators
public FlowFileTable(ProcessSession session, FlowFile flowFile, RecordSchema schema, RecordReaderFactory recordReaderFactory, ComponentLog logger)
public void setFlowFile(ProcessSession session, FlowFile flowFile)
public void close()
public org.apache.calcite.linq4j.Enumerable<Object> project(int[] fields)
Called from generated code.
public int getRecordsRead()
public org.apache.calcite.linq4j.tree.Expression getExpression(org.apache.calcite.schema.SchemaPlus schema, String tableName, Class clazz)
getExpression
in interface org.apache.calcite.schema.QueryableTable
public Type getElementType()
getElementType
in interface org.apache.calcite.schema.QueryableTable
public <T> org.apache.calcite.linq4j.Queryable<T> asQueryable(org.apache.calcite.linq4j.QueryProvider queryProvider, org.apache.calcite.schema.SchemaPlus schema, String tableName)
asQueryable
in interface org.apache.calcite.schema.QueryableTable
public org.apache.calcite.rel.RelNode toRel(org.apache.calcite.plan.RelOptTable.ToRelContext context, org.apache.calcite.plan.RelOptTable relOptTable)
toRel
in interface org.apache.calcite.schema.TranslatableTable
public org.apache.calcite.rel.type.RelDataType getRowType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
getRowType
in interface org.apache.calcite.schema.Table
private org.apache.calcite.rel.type.RelDataType getRelDataType(DataType fieldType, org.apache.calcite.adapter.java.JavaTypeFactory typeFactory)
private boolean isNumeric(DataType dataType)
public org.apache.calcite.schema.Schema.TableType getJdbcTableType()
getJdbcTableType
in interface org.apache.calcite.schema.Table
getJdbcTableType
in class org.apache.calcite.schema.impl.AbstractTable
Copyright © 2020 Apache NiFi Project. All rights reserved.