public class RepeatedListWriter extends ObjectArrayWriter
Because repeated lists can be nested, they support incremental construction. Build the outer array, then the inner, then the leaf to build a 3D array. Since building is incremental, this form of array must track state and use the state to keep the newly-added element writer in sync.
To keep things (relatively) simple, the repeated list array starts out with an inner list. For the row set writer, the inner list is the actual element writer. For the result set loader, the inner list is a dummy, to be replaced by the real one once it is discovered by reading data (or by parsing a schema.)
Modifier and Type | Class and Description |
---|---|
static interface |
RepeatedListWriter.ArrayListener |
AbstractArrayWriter.ArrayElementWriterIndex, AbstractArrayWriter.ArrayObjectWriter, AbstractArrayWriter.BaseArrayWriter
WriterEvents.ColumnWriterListener, WriterEvents.State
elementIndex, elementObjWriter, offsetsWriter, outerIndex
Modifier | Constructor and Description |
---|---|
protected |
RepeatedListWriter(ColumnMetadata schema,
UInt4Vector offsetVector,
AbstractObjectWriter elementWriter) |
Modifier and Type | Method and Description |
---|---|
void |
bindListener(RepeatedListWriter.ArrayListener listener) |
static AbstractObjectWriter |
buildRepeatedList(ColumnMetadata schema,
RepeatedListVector vector,
AbstractObjectWriter elementWriter) |
AbstractObjectWriter |
defineElement(ColumnMetadata schema) |
AbstractObjectWriter |
defineElement(MaterializedField schema) |
void |
endWrite()
End a batch: finalize any vector values.
|
void |
saveRow()
Saves a row.
|
void |
startRow()
Start a new row.
|
void |
startWrite()
Start a write (batch) operation.
|
save, setObject
bindIndex, dump, endArrayValue, lastWriteIndex, postRollover, preRollover, restartRow
array, bindListener, copy, dict, entry, entryType, isProjected, nullable, offsetWriter, rowStartIndex, scalar, schema, setNull, setNull, size, tuple, type, variant, writeIndex
protected RepeatedListWriter(ColumnMetadata schema, UInt4Vector offsetVector, AbstractObjectWriter elementWriter)
public static AbstractObjectWriter buildRepeatedList(ColumnMetadata schema, RepeatedListVector vector, AbstractObjectWriter elementWriter)
public void bindListener(RepeatedListWriter.ArrayListener listener)
public AbstractObjectWriter defineElement(MaterializedField schema)
public AbstractObjectWriter defineElement(ColumnMetadata schema)
public void startWrite()
WriterEvents
startWrite
in interface WriterEvents
startWrite
in class AbstractArrayWriter.BaseArrayWriter
public void startRow()
WriterEvents
WriterEvents.restartRow()
instead.startRow
in interface WriterEvents
startRow
in class AbstractArrayWriter.BaseArrayWriter
public void saveRow()
WriterEvents
saveRow
in interface WriterEvents
saveRow
in class AbstractArrayWriter.BaseArrayWriter
public void endWrite()
WriterEvents
endWrite
in interface WriterEvents
endWrite
in class AbstractArrayWriter.BaseArrayWriter
Copyright © 1970 The Apache Software Foundation. All rights reserved.