public class ListVector extends BaseRepeatedValueVector implements FieldVector, PromotableVector
Modifier and Type | Class and Description |
---|---|
class |
ListVector.Accessor |
class |
ListVector.Mutator |
BaseRepeatedValueVector.BaseRepeatedAccessor, BaseRepeatedValueVector.BaseRepeatedMutator
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutator
RepeatedValueVector.RepeatedAccessor, RepeatedValueVector.RepeatedMutator
DATA_VECTOR_NAME, DEFAULT_DATA_VECTOR, OFFSETS_VECTOR_NAME, vector
allocator, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, name
DEFAULT_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
|
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() |
UnionListReader |
getReader() |
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator) |
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator,
CallBack callBack) |
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, size
checkBufRefs, close, getAllocator, getTransferPair, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, getAllocator, getBufferSizeFor, getTransferPair, getValueCapacity, setInitialCapacity
forEach, 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)
FieldVector
initializeChildrenFromFields
in interface FieldVector
children
- the schemapublic List<FieldVector> getChildrenFromFields()
FieldVector
getChildrenFromFields
in interface FieldVector
public void loadFieldBuffers(ArrowFieldNode fieldNode, List<ArrowBuf> ownBuffers)
FieldVector
loadFieldBuffers
in interface FieldVector
fieldNode
- the fieldNodeownBuffers
- the buffers for this Field (own buffers only, children not included)public List<ArrowBuf> getFieldBuffers()
FieldVector
getFieldBuffers
in interface FieldVector
public List<BufferBacked> getFieldInnerVectors()
getFieldInnerVectors
in interface FieldVector
public UnionListWriter getWriter()
public void allocateNew() throws OutOfMemoryException
ValueVector
allocateNew
in interface ValueVector
OutOfMemoryException
- Thrown if no memory can be allocated.public void reAlloc()
ValueVector
reAlloc
in interface ValueVector
reAlloc
in class BaseRepeatedValueVector
public void copyFromSafe(int inIndex, int outIndex, ListVector from)
public void copyFrom(int inIndex, int outIndex, ListVector from)
public FieldVector getDataVector()
getDataVector
in interface RepeatedValueVector
getDataVector
in class BaseRepeatedValueVector
public TransferPair getTransferPair(String ref, BufferAllocator allocator)
getTransferPair
in interface ValueVector
public TransferPair getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
getTransferPair
in interface ValueVector
public TransferPair makeTransferPair(ValueVector target)
ValueVector
makeTransferPair
in interface ValueVector
target
- the target for the transfertransfer pair
that is used to transfer underlying
buffers into the target vector.public ListVector.Accessor getAccessor()
getAccessor
in interface RepeatedValueVector
getAccessor
in interface ValueVector
accessor
that is used to read from this vector
instance.public ListVector.Mutator getMutator()
getMutator
in interface RepeatedValueVector
getMutator
in interface ValueVector
mutator
that is used to write to this vector
instance.public UnionListReader getReader()
getReader
in interface ValueVector
field reader
that supports reading values
from this vector.public boolean allocateNewSafe()
ValueVector
allocateNewSafe
in interface ValueVector
allocateNewSafe
in class BaseRepeatedValueVector
public <T extends ValueVector> AddOrGetResult<T> addOrGetVector(FieldType fieldType)
addOrGetVector
in interface PromotableVector
addOrGetVector
in class BaseRepeatedValueVector
public int getBufferSize()
getBufferSize
in interface ValueVector
getBufferSize
in class BaseRepeatedValueVector
public Field getField()
ValueVector
getField
in interface ValueVector
public Types.MinorType getMinorType()
getMinorType
in interface ValueVector
public void clear()
ValueVector
clear
in interface ValueVector
clear
in class BaseRepeatedValueVector
public ArrowBuf[] getBuffers(boolean clear)
ValueVector
getBuffers
in interface ValueVector
getBuffers
in class BaseRepeatedValueVector
clear
- 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 PromotableVector
Copyright © 2017 The Apache Software Foundation. All rights reserved.