Class AbstractContainerVector

All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<ValueVector>, DensityAwareVector, ValueVector
Direct Known Subclasses:
AbstractStructVector, DenseUnionVector, UnionVector

public abstract class AbstractContainerVector extends Object implements ValueVector, DensityAwareVector
Base class for composite vectors.

This class implements common functionality of composite vectors.

  • Field Details

  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Representation of vector suitable for debugging.
      toString in class Object
    • allocateNew

      public void allocateNew() throws OutOfMemoryException
      Description copied from interface: ValueVector
      Allocate new buffers. ValueVector implements logic to determine how much to allocate.
      Specified by:
      allocateNew in interface ValueVector
      OutOfMemoryException - Thrown if no memory can be allocated.
    • getAllocator

      public BufferAllocator getAllocator()
      Specified by:
      getAllocator in interface ValueVector
    • getChild

      public FieldVector getChild(String name)
      Returns a ValueVector corresponding to the given field name if exists or null.
      name - the name of the child to return
      the corresponding FieldVector
    • close

      public void close()
      Clears out all underlying child vectors.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface ValueVector
    • typeify

      protected <T extends ValueVector> T typeify(ValueVector v, Class<T> clazz)
    • supportsDirectRead

      protected boolean supportsDirectRead()
    • size

      public abstract int size()
    • addOrGet

      public abstract <T extends FieldVector> T addOrGet(String name, FieldType fieldType, Class<T> clazz)
    • getChild

      public abstract <T extends FieldVector> T getChild(String name, Class<T> clazz)
    • getChildVectorWithOrdinal

      public abstract VectorWithOrdinal getChildVectorWithOrdinal(String name)
    • addOrGetStruct

      public StructVector addOrGetStruct(String name)
    • addOrGetList

      public ListVector addOrGetList(String name)
    • addOrGetUnion

      public UnionVector addOrGetUnion(String name)
    • addOrGetFixedSizeList

      public FixedSizeListVector addOrGetFixedSizeList(String name, int listSize)
    • addOrGetMap

      public MapVector addOrGetMap(String name, boolean keysSorted)
    • copyFrom

      public void copyFrom(int fromIndex, int thisIndex, ValueVector from)
      Description copied from interface: ValueVector
      Copy a cell value from a particular index in source vector to a particular position in this vector.
      Specified by:
      copyFrom in interface ValueVector
      fromIndex - position to copy from in source vector
      thisIndex - position to copy to in this vector
      from - source vector
    • copyFromSafe

      public void copyFromSafe(int fromIndex, int thisIndex, ValueVector from)
      Description copied from interface: ValueVector
      Same as ValueVector.copyFrom(int, int, ValueVector) except that it handles the case when the capacity of the vector needs to be expanded before copy.
      Specified by:
      copyFromSafe in interface ValueVector
      fromIndex - position to copy from in source vector
      thisIndex - position to copy to in this vector
      from - source vector
    • getName

      public String getName()
      Description copied from interface: ValueVector
      Gets the name of the vector.
      Specified by:
      getName in interface ValueVector
      the name of the vector.