public abstract class AbstractObjectWriter extends Object implements ObjectWriter
Constructor and Description |
---|
AbstractObjectWriter() |
Modifier and Type | Method and Description |
---|---|
ArrayWriter |
array() |
void |
copy(ColumnReader from)
Copy a single value from the given reader, which must be of the
same type as this writer.
|
DictWriter |
dict() |
abstract void |
dump(HierarchicalFormatter format) |
abstract WriterEvents |
events()
The internal state behind this writer.
|
boolean |
isProjected()
Whether this writer is projected (is backed by a materialized vector),
or is unprojected (is just a dummy writer.) In most cases, clients can
ignore whether the column is projected and just write to the writer.
|
boolean |
nullable()
Whether this writer allows nulls.
|
ScalarWriter |
scalar() |
ColumnMetadata |
schema()
Returns the schema of the column associated with this writer.
|
void |
setNull()
Set the current value to null.
|
void |
setObject(Object value)
Generic technique to write data as a generic Java object.
|
String |
toString() |
TupleWriter |
tuple() |
ObjectType |
type()
Return the object (structure) type of this writer.
|
VariantWriter |
variant() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
writer
public ScalarWriter scalar()
scalar
in interface ObjectWriter
public TupleWriter tuple()
tuple
in interface ObjectWriter
public ArrayWriter array()
array
in interface ObjectWriter
public VariantWriter variant()
variant
in interface ObjectWriter
public DictWriter dict()
dict
in interface ObjectWriter
public abstract WriterEvents events()
ObjectWriter
events
in interface ObjectWriter
public ColumnMetadata schema()
ColumnWriter
schema
in interface ColumnWriter
public ObjectType type()
ColumnWriter
type
in interface ColumnWriter
public boolean nullable()
ColumnWriter
TypeProtos.DataMode.OPTIONAL
type in the schema. List entries
are nullable, if they are primitive, but not if they are maps or lists.
Unions are nullable, regardless of cardinality.nullable
in interface ColumnWriter
ColumnWriter.setNull()
is supported, false
if notpublic void setNull()
ColumnWriter
setNull
in interface ColumnWriter
public void setObject(Object value)
ColumnWriter
setObject
in interface ColumnWriter
value
- value to write to the vector. The Java type of the
object indicates the Drill storage typepublic boolean isProjected()
ColumnWriter
isProjected
in interface ColumnWriter
public void copy(ColumnReader from)
ColumnWriter
copy
in interface ColumnWriter
from
- reader to provide the datapublic abstract void dump(HierarchicalFormatter format)
Copyright © 1970 The Apache Software Foundation. All rights reserved.