Interface ChunkWriter<SOURCE_CHUNK_TYPE extends Chunk<Values>>

Type Parameters:
SOURCE_CHUNK_TYPE - The type of chunk of source data, extending Chunk with Values.
All Known Implementing Classes:
BaseChunkWriter, BigDecimalChunkWriter, BooleanChunkWriter, ByteChunkWriter, CharChunkWriter, DoubleChunkWriter, FixedWidthChunkWriter, FixedWidthObjectChunkWriter, FloatChunkWriter, IntChunkWriter, ListChunkWriter, LongChunkWriter, MapChunkWriter, NullChunkWriter, ShortChunkWriter, UnionChunkWriter, VarBinaryChunkWriter

public interface ChunkWriter<SOURCE_CHUNK_TYPE extends Chunk<Values>>
The ChunkWriter interface provides a mechanism for writing chunks of data into a structured format suitable for transmission in Apache Arrow's columnar format. It enables efficient handling of chunked data, including support for various data types and logical structures. This interface is part of the Deephaven Barrage extensions for efficient data streaming and processing.
  • Method Details

    • makeContext

      ChunkWriter.Context makeContext(@NotNull SOURCE_CHUNK_TYPE chunk, long rowOffset)
      Create a context for the given chunk.
      Parameters:
      chunk - the chunk of data to be written
      rowOffset - the offset into the logical message potentially spread over multiple chunks
      Returns:
      a context for the given chunk
    • getInputStream

      ChunkWriter.DrainableColumn getInputStream(@NotNull @NotNull ChunkWriter.Context context, @Nullable @Nullable RowSet subset, @NotNull @NotNull BarrageOptions options) throws IOException
      Get an input stream optionally position-space filtered using the provided RowSet.
      Parameters:
      context - the chunk writer context holding the data to be drained to the client
      subset - if provided, is a position-space filter of source data
      options - options for writing to the stream
      Returns:
      a single-use DrainableColumn ready to be drained via grpc
      Throws:
      IOException
    • getEmptyInputStream

      ChunkWriter.DrainableColumn getEmptyInputStream(@NotNull @NotNull BarrageOptions options) throws IOException
      Get an input stream representing the empty wire payload for this writer.
      Parameters:
      options - options for writing to the stream
      Returns:
      a single-use DrainableColumn ready to be drained via grpc
      Throws:
      IOException
    • isFieldNullable

      boolean isFieldNullable()
      Returns:
      whether the wire format for this writer might include a validity buffer