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.
  • 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 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
    • 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 type
      type - the Java type to be read into the chunk
      componentType - the Java type of nested components
      arrowField - the Arrow type to be read into the chunk
      Returns:
      a TypeInfo instance