Interface ChunkReader<READ_CHUNK_TYPE extends WritableChunk<Values>>
- Type Parameters:
READ_CHUNK_TYPE
- The type of chunk being read, extendingWritableChunk
withValues
.
- All Known Implementing Classes:
BaseChunkReader
,BooleanChunkReader
,ByteChunkReader
,CharChunkReader
,DoubleChunkReader
,FixedWidthChunkReader
,FloatChunkReader
,IntChunkReader
,ListChunkReader
,LongChunkReader
,MapChunkReader
,NullChunkReader
,ShortChunkReader
,SingleElementListHeaderReader
,TransformingChunkReader
,UnionChunkReader
,VarBinaryChunkReader
public interface ChunkReader<READ_CHUNK_TYPE extends WritableChunk<Values>>
The
ChunkReader
interface provides a mechanism for consuming Flight/Barrage streams and transforming them
into WritableChunk
instances for further processing. It facilitates efficient deserialization of columnar
data, supporting various data types and logical structures. This interface is part of the Deephaven Barrage
extensions for handling streamed data ingestion.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Supports creation ofChunkReader
instances to use when processing a flight stream. -
Method Summary
Modifier and TypeMethodDescriptiondefault READ_CHUNK_TYPE
readChunk
(@NotNull Iterator<ChunkWriter.FieldNodeInfo> fieldNodeIter, PrimitiveIterator.OfLong bufferInfoIter, @NotNull DataInput is) Reads the given DataInput to extract the next Arrow buffer as a Deephaven Chunk.readChunk
(@NotNull Iterator<ChunkWriter.FieldNodeInfo> fieldNodeIter, PrimitiveIterator.OfLong bufferInfoIter, @NotNull DataInput is, @Nullable WritableChunk<Values> outChunk, int outOffset, int totalRows) Reads the given DataInput to extract the next Arrow buffer as a Deephaven Chunk.
-
Method Details
-
readChunk
@FinalDefault default READ_CHUNK_TYPE readChunk(@NotNull @NotNull Iterator<ChunkWriter.FieldNodeInfo> fieldNodeIter, @NotNull PrimitiveIterator.OfLong bufferInfoIter, @NotNull @NotNull DataInput is) 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 read- Returns:
- a Chunk containing the data from the stream
- Throws:
IOException
- if an error occurred while reading the stream
-
readChunk
READ_CHUNK_TYPE readChunk(@NotNull @NotNull Iterator<ChunkWriter.FieldNodeInfo> fieldNodeIter, @NotNull PrimitiveIterator.OfLong bufferInfoIter, @NotNull @NotNull DataInput is, @Nullable @Nullable 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
-