Package org.apache.nifi.sql
Class IterableRowStream<T>
java.lang.Object
org.apache.nifi.sql.IterableRowStream<T>
- Type Parameters:
T- the type object in the Iterable
- All Implemented Interfaces:
AutoCloseable,RowStream
A convenience implementation of RowStream that can be used to convert any
Iterable to a RowStream.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
iterator
-
transform
-
-
Constructor Details
-
IterableRowStream
Creates an IterableRowStream that is capable of iterating over the objects in the givenIterable- Parameters:
iterable- an Iterable that is capable of iterating over objectstransform- a transformation function that is capable of converting the Objects in the Iterable to theObject[]necessary for Calcite.
-
-
Method Details
-
nextRow
Description copied from interface:RowStreamReturns the next row of data as an object array, ornullif the stream is out of data. Note that the objects returned MUST adhere to the schema of theResettableDataSourcethat created this RowStream. -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-