Class VectorUnloader

java.lang.Object
org.apache.arrow.vector.VectorUnloader

public class VectorUnloader extends Object
Helper class that handles converting a VectorSchemaRoot to a ArrowRecordBatch.
  • Constructor Details

    • VectorUnloader

      public VectorUnloader(VectorSchemaRoot root)
      Constructs a new instance of the given set of vectors.
    • VectorUnloader

      public VectorUnloader(VectorSchemaRoot root, boolean includeNullCount, boolean alignBuffers)
      Constructs a new instance.
      Parameters:
      root - The set of vectors to serialize to an ArrowRecordBatch.
      includeNullCount - Controls whether null count is copied to the ArrowRecordBatch
      alignBuffers - Controls if buffers get aligned to 8-byte boundaries.
    • VectorUnloader

      public VectorUnloader(VectorSchemaRoot root, boolean includeNullCount, CompressionCodec codec, boolean alignBuffers)
      Constructs a new instance.
      Parameters:
      root - The set of vectors to serialize to an ArrowRecordBatch.
      includeNullCount - Controls whether null count is copied to the ArrowRecordBatch
      codec - the codec for compressing data. If it is null, then no compression is needed.
      alignBuffers - Controls if buffers get aligned to 8-byte boundaries.
  • Method Details

    • getRecordBatch

      public ArrowRecordBatch getRecordBatch()
      Performs the depth first traversal of the Vectors to create an ArrowRecordBatch suitable for serialization.