Class BaseChunkReader<READ_CHUNK_TYPE extends WritableChunk<Values>>

java.lang.Object
io.deephaven.extensions.barrage.chunk.BaseChunkReader<READ_CHUNK_TYPE>
All Implemented Interfaces:
ChunkReader<READ_CHUNK_TYPE>
Direct Known Subclasses:
BooleanChunkReader, ByteChunkReader, CharChunkReader, DictionaryChunkReader, DoubleChunkReader, FixedWidthChunkReader, FloatChunkReader, IntChunkReader, ListChunkReader, LongChunkReader, MapChunkReader, NullChunkReader, RunEndEncodedChunkReader, ShortChunkReader, SingleElementListHeaderReader, TransformingChunkReader, UnionChunkReader, VarBinaryChunkReader

public abstract class BaseChunkReader<READ_CHUNK_TYPE extends WritableChunk<Values>> extends Object implements ChunkReader<READ_CHUNK_TYPE>
  • Field Details

    • BULK_READ_BUFFER_BYTES

      protected static final int BULK_READ_BUFFER_BYTES
      Upper bound (in bytes) on a single bulk payload read shared by the fixed-width primitive readers. Wide columns are decoded in windows of this size rather than materializing the entire payload at once. Configure once here (rather than per type) via BaseChunkReader.bulkReadBufferBytes.
  • Constructor Details

    • BaseChunkReader

      public BaseChunkReader()
  • Method Details

    • readIntBuffer

      protected static void readIntBuffer(@NotNull @NotNull DataInput is, @NotNull @NotNull WritableIntChunk<?> dest, int numElements) throws IOException
      Read numElements little-endian ints — an Arrow offsets or lengths buffer — into dest, pulling the payload in bounded windows into a reused buffer rather than making one DataInput call, i.e. four individual byte reads, per value.
      Parameters:
      is - the input to read from
      dest - the chunk to populate, starting at position zero
      numElements - the number of values to read
      Throws:
      IOException
    • castOrCreateChunk

      public static <ATTR extends Any, T extends WritableChunk<ATTR>> T castOrCreateChunk(WritableChunk<ATTR> outChunk, int outOffset, int numRows, IntFunction<T> chunkFactory, Function<WritableChunk<ATTR>,T> castFunction)
    • getChunkTypeFor

      public static ChunkType getChunkTypeFor(Class<?> dest)
    • readValidityBuffer

      protected static void readValidityBuffer(@NotNull @NotNull DataInput is, int numValidityLongs, long validityBufferLength, @NotNull @NotNull WritableLongChunk<Values> isValid, @NotNull @NotNull String DEBUG_NAME) throws IOException
      Throws:
      IOException