Class VectorAccessibleComplexWriter

All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<ValueVector>, ValueVector

public class VectorAccessibleComplexWriter extends MapVector
  • Constructor Details

    • VectorAccessibleComplexWriter

      public VectorAccessibleComplexWriter(VectorContainer vc)
  • Method Details

    • addOrGet

      public <T extends ValueVector> T addOrGet(String name, TypeProtos.MajorType type, Class<T> clazz)
      Description copied from class: AbstractMapVector
      Adds a new field with the given parameters or replaces the existing one and consequently returns the resultant ValueVector. Execution takes place in the following order:
      • if field is new, create and insert a new vector of desired type.
      • if field exists and existing vector is of desired vector type, return the vector.
      • if field exists and null filled, clear the existing vector; create and insert a new vector of desired type.
      • otherwise, throw an IllegalStateException
      Overrides:
      addOrGet in class AbstractMapVector
      Type Parameters:
      T - class type of expected vector type
      Parameters:
      name - name of the field
      type - type of the field
      clazz - class of expected vector type
      Returns:
      resultant ValueVector
    • getWriter

      public static BaseWriter.ComplexWriter getWriter(String name, VectorContainer container)