Class StructVectorUnloader

java.lang.Object
org.apache.arrow.c.StructVectorUnloader

public class StructVectorUnloader extends Object
Helper class that handles converting a StructVector to a ArrowRecordBatch.
  • Constructor Details

    • StructVectorUnloader

      public StructVectorUnloader(StructVector root)
      Constructs a new instance of the given struct vector.
    • StructVectorUnloader

      public StructVectorUnloader(StructVector root, boolean includeNullCount, boolean alignBuffers)
      Constructs a new instance.
      Parameters:
      root - The struct vector 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.
    • StructVectorUnloader

      public StructVectorUnloader(StructVector root, boolean includeNullCount, CompressionCodec codec, boolean alignBuffers)
      Constructs a new instance.
      Parameters:
      root - The struct vector 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.