public class FixedSizeListVector extends BaseValueVector implements FieldVector, PromotableVector
Modifier and Type | Class and Description |
---|---|
class |
FixedSizeListVector.Accessor |
class |
FixedSizeListVector.Mutator |
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutator
allocator, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, name
Constructor and Description |
---|
FixedSizeListVector(String name,
BufferAllocator allocator,
FieldType fieldType,
CallBack schemaChangeCallback) |
FixedSizeListVector(String name,
BufferAllocator allocator,
int listSize,
DictionaryEncoding dictionary,
CallBack schemaChangeCallback)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
<T extends ValueVector> |
addOrGetVector(FieldType type) |
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 fromIndex,
int thisIndex,
FixedSizeListVector from) |
void |
copyFromSafe(int inIndex,
int outIndex,
FixedSizeListVector from) |
static FixedSizeListVector |
empty(String name,
int size,
BufferAllocator allocator) |
FixedSizeListVector.Accessor |
getAccessor() |
ArrowBuf[] |
getBuffers(boolean clear)
Return the underlying buffers associated with this vector.
|
int |
getBufferSize() |
int |
getBufferSizeFor(int valueCount)
Returns the number of bytes that is used by this vector if it holds the given number
of values.
|
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() |
int |
getListSize() |
Types.MinorType |
getMinorType() |
FixedSizeListVector.Mutator |
getMutator() |
UnionFixedSizeListReader |
getReader() |
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator) |
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator,
CallBack callBack) |
int |
getValueCapacity()
Returns the maximum number of values that can be stored in this vector instance.
|
void |
initializeChildrenFromFields(List<Field> children)
Initializes the child vectors
to be later loaded with loadBuffers
|
Iterator<ValueVector> |
iterator() |
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.
|
void |
setInitialCapacity(int numRecords)
Set the initial record capacity
|
int |
size() |
checkBufRefs, close, getAllocator, getTransferPair, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, getAllocator, getTransferPair
forEach, spliterator
@Deprecated public FixedSizeListVector(String name, BufferAllocator allocator, int listSize, DictionaryEncoding dictionary, CallBack schemaChangeCallback)
public FixedSizeListVector(String name, BufferAllocator allocator, FieldType fieldType, CallBack schemaChangeCallback)
public static FixedSizeListVector empty(String name, int size, BufferAllocator allocator)
public Field getField()
ValueVector
getField
in interface ValueVector
public Types.MinorType getMinorType()
getMinorType
in interface ValueVector
public int getListSize()
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 FixedSizeListVector.Accessor getAccessor()
getAccessor
in interface ValueVector
accessor
that is used to read from this vector
instance.public FixedSizeListVector.Mutator getMutator()
getMutator
in interface ValueVector
mutator
that is used to write to this vector
instance.public UnionFixedSizeListReader getReader()
getReader
in interface ValueVector
field reader
that supports reading values
from this vector.public void allocateNew() throws OutOfMemoryException
ValueVector
allocateNew
in interface ValueVector
OutOfMemoryException
- Thrown if no memory can be allocated.public boolean allocateNewSafe()
ValueVector
allocateNewSafe
in interface ValueVector
public void reAlloc()
ValueVector
reAlloc
in interface ValueVector
public FieldVector getDataVector()
public void setInitialCapacity(int numRecords)
ValueVector
setInitialCapacity
in interface ValueVector
numRecords
- the initial record capacity.public int getValueCapacity()
ValueVector
getValueCapacity
in interface ValueVector
public int getBufferSize()
getBufferSize
in interface ValueVector
public int getBufferSizeFor(int valueCount)
ValueVector
getBufferSizeFor
in interface ValueVector
valueCount
- the number of values to assume this vector containspublic Iterator<ValueVector> iterator()
iterator
in interface Iterable<ValueVector>
iterator
in class BaseValueVector
public void clear()
ValueVector
clear
in interface ValueVector
clear
in class BaseValueVector
public ArrowBuf[] getBuffers(boolean clear)
ValueVector
getBuffers
in interface ValueVector
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 int size()
public <T extends ValueVector> AddOrGetResult<T> addOrGetVector(FieldType type)
addOrGetVector
in interface PromotableVector
public void copyFromSafe(int inIndex, int outIndex, FixedSizeListVector from)
public void copyFrom(int fromIndex, int thisIndex, FixedSizeListVector from)
public UnionVector promoteToUnion()
promoteToUnion
in interface PromotableVector
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.Copyright © 2017 The Apache Software Foundation. All rights reserved.