Class ColumnarBatch

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class ColumnarBatch
    extends java.lang.Object
    implements java.lang.AutoCloseable
    This class is inspired by Spark's ColumnarBatch. This class wraps a columnar batch in the result set of an Iceberg table query.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Called to close all the columns in this batch.
      ColumnVector column​(int ordinal)
      Returns the column at `ordinal`.
      org.apache.arrow.vector.VectorSchemaRoot createVectorSchemaRootFromVectors()
      Create a new instance of VectorSchemaRoot from the arrow vectors stored in this arrow batch.
      int numCols()
      Returns the number of columns that make up this batch.
      int numRows()
      Returns the number of rows for read, including filtered rows.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createVectorSchemaRootFromVectors

        public org.apache.arrow.vector.VectorSchemaRoot createVectorSchemaRootFromVectors()
        Create a new instance of VectorSchemaRoot from the arrow vectors stored in this arrow batch. The arrow vectors are owned by the reader.
      • close

        public void close()
        Called to close all the columns in this batch. It is not valid to access the data after calling this. This must be called at the end to clean up memory allocations.
        Specified by:
        close in interface java.lang.AutoCloseable
      • numCols

        public int numCols()
        Returns the number of columns that make up this batch.
      • numRows

        public int numRows()
        Returns the number of rows for read, including filtered rows.
      • column

        public ColumnVector column​(int ordinal)
        Returns the column at `ordinal`.