Interface ChunkReader
- All Known Implementing Classes:
BooleanChunkReader
,ByteChunkReader
,CharChunkReader
,DoubleChunkReader
,FloatChunkReader
,IntChunkReader
,LongChunkReader
,ShortChunkReader
,VarListChunkReader
,VectorChunkReader
public interface ChunkReader
Consumes Flight/Barrage streams and transforms them into WritableChunks.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Supports creation ofChunkReader
instances to use when processing a flight stream.static class
Describes type info used by factory implementations when creating a ChunkReader. -
Method Summary
Modifier and TypeMethodDescriptionreadChunk
(Iterator<ChunkInputStreamGenerator.FieldNodeInfo> fieldNodeIter, PrimitiveIterator.OfLong bufferInfoIter, DataInput is, WritableChunk<Values> outChunk, int outOffset, int totalRows) Reads the given DataInput to extract the next Arrow buffer as a Deephaven Chunk.static ChunkReader.TypeInfo
typeInfo
(ChunkType chunkType, Class<?> type, Class<?> componentType, org.apache.arrow.flatbuf.Field arrowField) Factory method to create a TypeInfo instance.
-
Method Details
-
readChunk
WritableChunk<Values> readChunk(Iterator<ChunkInputStreamGenerator.FieldNodeInfo> fieldNodeIter, PrimitiveIterator.OfLong bufferInfoIter, DataInput is, WritableChunk<Values> outChunk, int outOffset, int totalRows) throws IOException Reads the given DataInput to extract the next Arrow buffer as a Deephaven Chunk.- Parameters:
fieldNodeIter
- iterator to read fields from the streambufferInfoIter
- iterator to read buffers from the streamis
- input stream containing buffers to be readoutChunk
- chunk to write tooutOffset
- offset within the outChunk to begin writingtotalRows
- total rows to write to the outChunk- Returns:
- a Chunk containing the data from the stream
- Throws:
IOException
- if an error occurred while reading the stream
-
typeInfo
static ChunkReader.TypeInfo typeInfo(ChunkType chunkType, Class<?> type, Class<?> componentType, org.apache.arrow.flatbuf.Field arrowField) Factory method to create a TypeInfo instance.- Parameters:
chunkType
- the output chunk typetype
- the Java type to be read into the chunkcomponentType
- the Java type of nested componentsarrowField
- the Arrow type to be read into the chunk- Returns:
- a TypeInfo instance
-