Class PromotableWriter

java.lang.Object
org.apache.drill.exec.vector.complex.impl.PromotableWriter
All Implemented Interfaces:
AutoCloseable, Positionable, BaseWriter, BaseWriter.DictWriter, BaseWriter.ListWriter, BaseWriter.MapWriter, BaseWriter.ScalarWriter, BigIntWriter, BitWriter, DateWriter, Decimal18Writer, Decimal28DenseWriter, Decimal28SparseWriter, Decimal38DenseWriter, Decimal38SparseWriter, Decimal9Writer, FieldWriter, Float4Writer, Float8Writer, IntervalDayWriter, IntervalWriter, IntervalYearWriter, IntWriter, SmallIntWriter, TimeStampWriter, TimeWriter, TinyIntWriter, UInt1Writer, UInt2Writer, UInt4Writer, UInt8Writer, Var16CharWriter, VarBinaryWriter, VarCharWriter, VarDecimalWriter

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 AbstractMapVector or a ListVector.