public abstract class BaseRepeatedValueVector extends BaseValueVector implements RepeatedValueVector
| Modifier and Type | Class and Description |
|---|---|
class |
BaseRepeatedValueVector.BaseRepeatedAccessor |
class |
BaseRepeatedValueVector.BaseRepeatedMutator |
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutatorRepeatedValueVector.RepeatedAccessor, RepeatedValueVector.RepeatedMutatorValueVector.Accessor, ValueVector.Mutator| Modifier and Type | Field and Description |
|---|---|
static String |
DATA_VECTOR_NAME |
static FieldVector |
DEFAULT_DATA_VECTOR |
protected UInt4Vector |
offsets |
static String |
OFFSETS_VECTOR_NAME |
protected FieldVector |
vector |
allocator, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, nameDEFAULT_REPEAT_PER_RECORD| Modifier | Constructor and Description |
|---|---|
protected |
BaseRepeatedValueVector(String name,
BufferAllocator allocator) |
protected |
BaseRepeatedValueVector(String name,
BufferAllocator allocator,
FieldVector vector) |
| Modifier and Type | Method and Description |
|---|---|
<T extends ValueVector> |
addOrGetVector(Types.MinorType minorType) |
boolean |
allocateNewSafe()
Allocates new buffers.
|
void |
clear()
Release the underlying ArrowBuf and reset the ValueVector to empty.
|
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.
|
int |
getBufferSizeFor(int valueCount)
Returns the number of bytes that is used by this vector if it holds the given number
of values.
|
FieldVector |
getDataVector()
Returns the underlying data vector or null if none exists.
|
UInt4Vector |
getOffsetVector()
Returns the underlying offset vector or null if none exists.
|
int |
getValueCapacity()
Returns the maximum number of values that can be stored in this vector instance.
|
Iterator<ValueVector> |
iterator() |
protected void |
replaceDataVector(FieldVector v) |
void |
setInitialCapacity(int numRecords)
Set the initial record capacity
|
int |
size()
Returns 1 if inner vector is explicitly set via #addOrGetVector else 0
|
checkBufRefs, close, getAllocator, getTransferPair, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAccessor, getMutatorallocateNew, close, getAllocator, getField, getMinorType, getReader, getTransferPair, getTransferPair, makeTransferPairpublic static final FieldVector DEFAULT_DATA_VECTOR
public static final String OFFSETS_VECTOR_NAME
public static final String DATA_VECTOR_NAME
protected final UInt4Vector offsets
protected FieldVector vector
protected BaseRepeatedValueVector(String name, BufferAllocator allocator)
protected BaseRepeatedValueVector(String name, BufferAllocator allocator, FieldVector vector)
public boolean allocateNewSafe()
ValueVectorallocateNewSafe in interface ValueVectorpublic UInt4Vector getOffsetVector()
RepeatedValueVectorgetOffsetVector in interface RepeatedValueVectorpublic FieldVector getDataVector()
RepeatedValueVectorgetDataVector in interface RepeatedValueVectorpublic void setInitialCapacity(int numRecords)
ValueVectorsetInitialCapacity in interface ValueVectornumRecords - the initial record capacity.public int getValueCapacity()
ValueVectorgetValueCapacity in interface ValueVectorpublic int getBufferSize()
ValueVectorgetBufferSize in interface ValueVectorpublic int getBufferSizeFor(int valueCount)
ValueVectorgetBufferSizeFor in interface ValueVectorvalueCount - the number of values to assume this vector containspublic Iterator<ValueVector> iterator()
iterator in interface Iterable<ValueVector>iterator in class BaseValueVectorpublic void clear()
ValueVectorclear in interface ValueVectorclear in class BaseValueVectorpublic ArrowBuf[] getBuffers(boolean clear)
ValueVectorgetBuffers in interface ValueVectorclear - 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(Types.MinorType minorType)
protected void replaceDataVector(FieldVector v)
Copyright © 2016 The Apache Software Foundation. All rights reserved.