Class ColumnState.PrimitiveColumnState

java.lang.Object
org.apache.drill.exec.physical.resultSet.impl.ColumnState
org.apache.drill.exec.physical.resultSet.impl.ColumnState.PrimitiveColumnState
All Implemented Interfaces:
WriterEvents.ColumnWriterListener
Enclosing class:
ColumnState

public static class ColumnState.PrimitiveColumnState extends ColumnState implements WriterEvents.ColumnWriterListener
Primitive (non-map) column state. Handles all three cardinalities. Column metadata is hosted on the writer.
  • Constructor Details

    • PrimitiveColumnState

      public PrimitiveColumnState(org.apache.drill.exec.physical.resultSet.impl.LoaderInternals loader, AbstractObjectWriter colWriter, VectorState vectorState)
  • Method Details

    • canExpand

      public boolean canExpand(ScalarWriter writer, int delta)
      Description copied from interface: WriterEvents.ColumnWriterListener
      A writer wants to expand its vector. Allows the listener to either allow the growth, or trigger and overflow to limit batch size.
      Specified by:
      canExpand in interface WriterEvents.ColumnWriterListener
      Parameters:
      writer - the writer that wishes to grow its vector
      delta - the amount by which the vector is to grow
      Returns:
      true if the vector can be grown, false if the writer should instead trigger an overflow by calling overflowed()
    • overflowed

      public void overflowed(ScalarWriter writer)
      Description copied from interface: WriterEvents.ColumnWriterListener
      Alert the listener that a vector has overflowed. Upon return, all writers must have a new set of buffers available, ready to accept the in-flight value that triggered the overflow.
      Specified by:
      overflowed in interface WriterEvents.ColumnWriterListener
      Parameters:
      writer - the writer that triggered the overflow
    • outputSchema

      public ColumnMetadata outputSchema()
      Get the output schema. For a primitive (non-structured) column, the output schema is the same as the internal schema.
      Specified by:
      outputSchema in class ColumnState
    • dump

      public void dump(HierarchicalFormatter format)
      Overrides:
      dump in class ColumnState