Interface ObjectWriter
- All Superinterfaces:
ColumnWriter
- All Known Implementing Classes:
AbstractArrayWriter.ArrayObjectWriter
,AbstractObjectWriter
,AbstractScalarWriterImpl.ScalarObjectWriter
,AbstractTupleWriter.TupleObjectWriter
,DictEntryWriter.DictEntryObjectWriter
,ObjectDictWriter.DictObjectWriter
,UnionWriterImpl.VariantObjectWriter
Represents a column within a tuple. A column can be an array, a scalar or a
tuple. Each has an associated column metadata (schema) and a writer. The
writer is one of three kinds, depending on the kind of the column. If the
column is a map, then the column also has an associated tuple loader to
define and write to the tuple.
This interface defines a writer to set values for value vectors using a simple, uniform interface modeled after a JSON object. Every column value is an object of one of three types: scalar, array or tuple. Methods exist to "cast" this object to the proper type. This model allows a very simple representation: tuples (rows, maps) consist of objects. Arrays are lists of objects.
Every column resides at an index, is defined by a schema, is backed by a value vector, and and is written to by a writer. Each column also tracks the schema version in which it was added to detect schema evolution. Each column has an optional overflow vector that holds overflow record values when a batch becomes full.
-
Method Summary
Methods inherited from interface org.apache.drill.exec.vector.accessor.ColumnWriter
copy, isProjected, nullable, schema, setNull, setObject, type
-
Method Details
-
scalar
ScalarWriter scalar() -
tuple
TupleWriter tuple() -
array
ArrayWriter array() -
variant
VariantWriter variant() -
dict
DictWriter dict() -
writer
ColumnWriter writer()Generic version of the above, for dynamic handling of writers.- Returns:
- the generic form of the column writer
-
events
WriterEvents events()The internal state behind this writer. To be used only by the implementation, not by the client.
-