Interface ChunkReader<READ_CHUNK_TYPE extends WritableChunk<Values>>

Type Parameters:
READ_CHUNK_TYPE - The type of chunk being read, extending WritableChunk with Values.
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.
  • 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 stream
      bufferInfoIter - iterator to read buffers from the stream
      is - 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 stream
      bufferInfoIter - iterator to read buffers from the stream
      is - input stream containing buffers to be read
      outChunk - chunk to write to
      outOffset - offset within the outChunk to begin writing
      totalRows - 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