public class ListVector extends BaseRepeatedValueVector implements FieldVector, PromotableVector
| 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)
Deprecated.
|
ListVector(String name,
BufferAllocator allocator,
DictionaryEncoding dictionary,
CallBack callBack)
Deprecated.
|
ListVector(String name,
BufferAllocator allocator,
FieldType fieldType,
CallBack callBack) |
| Modifier and Type | Method and Description |
|---|---|
<T extends ValueVector> |
addOrGetVector(FieldType fieldType) |
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) |
static ListVector |
empty(String name,
BufferAllocator allocator) |
ListVector.Accessor |
getAccessor() |
ArrowBuf[] |
getBuffers(boolean clear)
Return the underlying buffers associated with this vector.
|
int |
getBufferSize() |
List<FieldVector> |
getChildrenFromFields()
the returned list is the same size as the list passed to initializeChildrenFromFields
|
ArrowBuf |
getDataBuffer()
Gets the underlying buffer associated with data vector
|
long |
getDataBufferAddress()
Gets the starting address of the underlying buffer associated with data vector
|
FieldVector |
getDataVector() |
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() |
ArrowBuf |
getOffsetBuffer()
Gets the underlying buffer associated with offset vector
|
long |
getOffsetBufferAddress()
Gets the starting address of the underlying buffer associated with offset vector
|
UnionListReader |
getReader() |
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator) |
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator,
CallBack callBack) |
ArrowBuf |
getValidityBuffer()
Gets the underlying buffer associated with validity vector
|
long |
getValidityBufferAddress()
Gets the starting address of the underlying buffer associated with validity vector
|
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)
makes a new transfer pair used to transfer underlying buffers
|
UnionVector |
promoteToUnion() |
void |
reAlloc()
Allocate new buffer with double capacity, and copy data into the new buffer.
|
getBufferSizeFor, getOffsetVector, getValueCapacity, iterator, replaceDataVector, setInitialCapacity, sizecheckBufRefs, close, getAllocator, getTransferPair, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, getAllocator, getBufferSizeFor, getTransferPair, getValueCapacity, setInitialCapacityforEach, iterator, spliterator@Deprecated public ListVector(String name, BufferAllocator allocator, CallBack callBack)
@Deprecated public ListVector(String name, BufferAllocator allocator, DictionaryEncoding dictionary, CallBack callBack)
public ListVector(String name, BufferAllocator allocator, FieldType fieldType, CallBack callBack)
public static ListVector empty(String name, BufferAllocator allocator)
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 reAlloc()
ValueVectorreAlloc in interface ValueVectorreAlloc in class BaseRepeatedValueVectorpublic void copyFromSafe(int inIndex,
int outIndex,
ListVector from)
public void copyFrom(int inIndex,
int outIndex,
ListVector from)
public FieldVector getDataVector()
getDataVector in interface RepeatedValueVectorgetDataVector in class BaseRepeatedValueVectorpublic TransferPair getTransferPair(String ref, BufferAllocator allocator)
getTransferPair in interface ValueVectorpublic TransferPair getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
getTransferPair in interface ValueVectorpublic TransferPair makeTransferPair(ValueVector target)
ValueVectormakeTransferPair in interface ValueVectortarget - the target for the transfertransfer pair that is used to transfer underlying
buffers into the target vector.public long getValidityBufferAddress()
FieldVectorgetValidityBufferAddress in interface FieldVectorpublic long getDataBufferAddress()
FieldVectorgetDataBufferAddress in interface FieldVectorpublic long getOffsetBufferAddress()
FieldVectorgetOffsetBufferAddress in interface FieldVectorpublic ArrowBuf getValidityBuffer()
ValueVectorgetValidityBuffer in interface ValueVectorpublic ArrowBuf getDataBuffer()
ValueVectorgetDataBuffer in interface ValueVectorpublic ArrowBuf getOffsetBuffer()
ValueVectorgetOffsetBuffer in interface ValueVectorpublic ListVector.Accessor getAccessor()
getAccessor in interface RepeatedValueVectorgetAccessor in interface ValueVectoraccessor that is used to read from this vector
instance.public ListVector.Mutator getMutator()
getMutator in interface RepeatedValueVectorgetMutator in interface ValueVectormutator that is used to write to this vector
instance.public UnionListReader getReader()
getReader in interface ValueVectorfield reader that supports reading values
from this vector.public boolean allocateNewSafe()
ValueVectorallocateNewSafe in interface ValueVectorallocateNewSafe in class BaseRepeatedValueVectorpublic <T extends ValueVector> AddOrGetResult<T> addOrGetVector(FieldType fieldType)
addOrGetVector in interface PromotableVectoraddOrGetVector in class BaseRepeatedValueVectorpublic int getBufferSize()
getBufferSize 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()
promoteToUnion in interface PromotableVectorCopyright © 2017 The Apache Software Foundation. All rights reserved.