Class AbstractFixedWidthWriter.BaseFixedWidthWriter

All Implemented Interfaces:
ColumnWriter, ScalarWriter, ValueWriter, WriterEvents, WriterPosition
Direct Known Subclasses:
AbstractFixedWidthWriter.BaseIntWriter, ColumnAccessors.BigIntColumnWriter, ColumnAccessors.DateColumnWriter, ColumnAccessors.Decimal18ColumnWriter, ColumnAccessors.Decimal28SparseColumnWriter, ColumnAccessors.Decimal38SparseColumnWriter, ColumnAccessors.Decimal9ColumnWriter, ColumnAccessors.Float4ColumnWriter, ColumnAccessors.Float8ColumnWriter, ColumnAccessors.IntervalColumnWriter, ColumnAccessors.IntervalDayColumnWriter, ColumnAccessors.IntervalYearColumnWriter, ColumnAccessors.TimeColumnWriter, ColumnAccessors.TimeStampColumnWriter, ColumnAccessors.UInt4ColumnWriter, ColumnAccessors.UInt8ColumnWriter
Enclosing class:

public abstract static class AbstractFixedWidthWriter.BaseFixedWidthWriter extends AbstractFixedWidthWriter
  • Constructor Details

    • BaseFixedWidthWriter

      public BaseFixedWidthWriter()
  • Method Details

    • prepareWrite

      protected final int prepareWrite()
      Determine the write index, growing, overflowing and back-filling the vector as needed.

      This is a bit tricky. This method has side effects, by design. The current vector buffer, and buffer address, will change in this method when a vector grows or overflows. So, don't use this method in inline calls of the form
      The buffer obtained by getBuffer() can be different than the current buffer after prepareWrite().

      the index at which to write the current value
    • prepareWrite

      protected final int prepareWrite(int writeIndex)
    • fillEmpties

      protected final void fillEmpties(int writeIndex)
      Fill empties. This is required because the allocated memory is not zero-filled. Also allows filling a non-nullable vector with a defined default value.
      Specified by:
      fillEmpties in class AbstractFixedWidthWriter