public class ListVector extends BaseRepeatedValueVector implements FieldVector
| Modifier and Type | Class and Description |
|---|---|
class |
ListVector.Accessor |
class |
ListVector.Mutator |
BaseRepeatedValueVector.BaseRepeatedAccessor, BaseRepeatedValueVector.BaseRepeatedMutatorBaseValueVector.BaseAccessor, BaseValueVector.BaseMutatorRepeatedValueVector.RepeatedAccessor, RepeatedValueVector.RepeatedMutatorDATA_VECTOR_NAME, DEFAULT_DATA_VECTOR, OFFSETS_VECTOR_NAME, vectorallocator, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, nameDEFAULT_REPEAT_PER_RECORD| Constructor and Description |
|---|
ListVector(String name,
BufferAllocator allocator,
CallBack callBack) |
| Modifier and Type | Method and Description |
|---|---|
<T extends ValueVector> |
addOrGetVector(Types.MinorType minorType) |
void |
allocateNew()
Allocate new buffers.
|
boolean |
allocateNewSafe()
Allocates new buffers.
|
void |
clear()
Release the underlying ArrowBuf and reset the ValueVector to empty.
|
void |
copyFrom(int inIndex,
int outIndex,
ListVector from) |
void |
copyFromSafe(int inIndex,
int outIndex,
ListVector from) |
ListVector.Accessor |
getAccessor()
Returns an
accessor that is used to read from this vector
instance. |
ArrowBuf[] |
getBuffers(boolean clear)
Return the underlying buffers associated with this vector.
|
int |
getBufferSize()
Returns the number of bytes that is used by this vector instance.
|
List<FieldVector> |
getChildrenFromFields()
the returned list is the same size as the list passed to initializeChildrenFromFields
|
FieldVector |
getDataVector()
Returns the underlying data vector or null if none exists.
|
Field |
getField()
Get information about how this field is materialized.
|
List<ArrowBuf> |
getFieldBuffers()
(same size as getFieldVectors() since it is their content)
|
List<BufferBacked> |
getFieldInnerVectors() |
Types.MinorType |
getMinorType() |
ListVector.Mutator |
getMutator()
Returns an
mutator that is used to write to this vector
instance. |
FieldReader |
getReader()
Returns a
field reader that supports reading values
from this vector. |
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator) |
UnionListWriter |
getWriter() |
void |
initializeChildrenFromFields(List<Field> children)
Initializes the child vectors
to be later loaded with loadBuffers
|
void |
loadFieldBuffers(ArrowFieldNode fieldNode,
List<ArrowBuf> ownBuffers)
loads data in the vectors
(ownBuffers must be the same size as getFieldVectors())
|
TransferPair |
makeTransferPair(ValueVector target)
Returns a new
transfer pair that is used to transfer underlying
buffers into the target vector. |
UnionVector |
promoteToUnion() |
getBufferSizeFor, getOffsetVector, getValueCapacity, iterator, replaceDataVector, setInitialCapacity, sizecheckBufRefs, close, getAllocator, getTransferPair, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, getAllocator, getBufferSizeFor, getTransferPair, getValueCapacity, setInitialCapacitypublic ListVector(String name, BufferAllocator allocator, CallBack callBack)
public void initializeChildrenFromFields(List<Field> children)
FieldVectorinitializeChildrenFromFields in interface FieldVectorchildren - the schemapublic List<FieldVector> getChildrenFromFields()
FieldVectorgetChildrenFromFields in interface FieldVectorpublic void loadFieldBuffers(ArrowFieldNode fieldNode, List<ArrowBuf> ownBuffers)
FieldVectorloadFieldBuffers in interface FieldVectorfieldNode - the fieldNodeownBuffers - the buffers for this Field (own buffers only, children not included)public List<ArrowBuf> getFieldBuffers()
FieldVectorgetFieldBuffers in interface FieldVectorpublic List<BufferBacked> getFieldInnerVectors()
getFieldInnerVectors in interface FieldVectorpublic UnionListWriter getWriter()
public void allocateNew()
throws OutOfMemoryException
ValueVectorallocateNew in interface ValueVectorOutOfMemoryException - Thrown if no memory can be allocated.public void copyFromSafe(int inIndex,
int outIndex,
ListVector from)
public void copyFrom(int inIndex,
int outIndex,
ListVector from)
public FieldVector getDataVector()
RepeatedValueVectorgetDataVector in interface RepeatedValueVectorgetDataVector in class BaseRepeatedValueVectorpublic TransferPair getTransferPair(String ref, BufferAllocator allocator)
getTransferPair in interface ValueVectorpublic TransferPair makeTransferPair(ValueVector target)
ValueVectortransfer pair that is used to transfer underlying
buffers into the target vector.makeTransferPair in interface ValueVectorpublic ListVector.Accessor getAccessor()
ValueVectoraccessor that is used to read from this vector
instance.getAccessor in interface RepeatedValueVectorgetAccessor in interface ValueVectorpublic ListVector.Mutator getMutator()
ValueVectormutator that is used to write to this vector
instance.getMutator in interface RepeatedValueVectorgetMutator in interface ValueVectorpublic FieldReader getReader()
ValueVectorfield reader that supports reading values
from this vector.getReader in interface ValueVectorpublic boolean allocateNewSafe()
ValueVectorallocateNewSafe in interface ValueVectorallocateNewSafe in class BaseRepeatedValueVectorpublic <T extends ValueVector> AddOrGetResult<T> addOrGetVector(Types.MinorType minorType)
addOrGetVector in class BaseRepeatedValueVectorpublic int getBufferSize()
ValueVectorgetBufferSize in interface ValueVectorgetBufferSize in class BaseRepeatedValueVectorpublic Field getField()
ValueVectorgetField in interface ValueVectorpublic Types.MinorType getMinorType()
getMinorType in interface ValueVectorpublic void clear()
ValueVectorclear in interface ValueVectorclear in class BaseRepeatedValueVectorpublic ArrowBuf[] getBuffers(boolean clear)
ValueVectorgetBuffers in interface ValueVectorgetBuffers in class BaseRepeatedValueVectorclear - Whether to clear vector before returning; the buffers will still be refcounted;
but the returned array will be the only reference to thembuffers that is used by this vector instance.public UnionVector promoteToUnion()
Copyright © 2016 The Apache Software Foundation. All rights reserved.