Class PromotableWriter

java.lang.Object
org.apache.arrow.vector.complex.impl.PromotableWriter
All Implemented Interfaces:
AutoCloseable, Positionable, BaseWriter, BaseWriter.ListWriter, BaseWriter.MapWriter, BaseWriter.ScalarWriter, BaseWriter.StructWriter, BigIntWriter, BitWriter, DateDayWriter, DateMilliWriter, Decimal256Writer, DecimalWriter, DurationWriter, FieldWriter, FixedSizeBinaryWriter, Float2Writer, Float4Writer, Float8Writer, IntervalDayWriter, IntervalMonthDayNanoWriter, IntervalYearWriter, IntWriter, LargeVarBinaryWriter, LargeVarCharWriter, SmallIntWriter, TimeMicroWriter, TimeMilliWriter, TimeNanoWriter, TimeSecWriter, TimeStampMicroTZWriter, TimeStampMicroWriter, TimeStampMilliTZWriter, TimeStampMilliWriter, TimeStampNanoTZWriter, TimeStampNanoWriter, TimeStampSecTZWriter, TimeStampSecWriter, TinyIntWriter, UInt1Writer, UInt2Writer, UInt4Writer, UInt8Writer, VarBinaryWriter, VarCharWriter, ViewVarBinaryWriter, ViewVarCharWriter

public class PromotableWriter extends Object
This FieldWriter implementation delegates all FieldWriter API calls to an inner FieldWriter. This inner field writer can start as a specific type, and this class will promote the writer to a UnionWriter if a call is made that the specifically typed writer cannot handle. A new UnionVector is created, wrapping the original vector, and replaces the original vector in the parent vector, which can be either an AbstractStructVector or a ListVector.

The writer used can either be for single elements (struct) or lists.