public abstract class BaseRepeatedValueVector extends BaseValueVector implements RepeatedValueVector
Modifier and Type | Class and Description |
---|---|
class |
BaseRepeatedValueVector.BaseRepeatedAccessor |
class |
BaseRepeatedValueVector.BaseRepeatedMutator |
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutator
RepeatedValueVector.RepeatedAccessor, RepeatedValueVector.RepeatedMutator
ValueVector.Accessor, ValueVector.Mutator
Modifier and Type | Field and Description |
---|---|
protected CallBack |
callBack |
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, name
DEFAULT_REPEAT_PER_RECORD
Modifier | Constructor and Description |
---|---|
protected |
BaseRepeatedValueVector(String name,
BufferAllocator allocator,
CallBack callBack) |
protected |
BaseRepeatedValueVector(String name,
BufferAllocator allocator,
FieldVector vector,
CallBack callBack) |
Modifier and Type | Method and Description |
---|---|
<T extends ValueVector> |
addOrGetVector(FieldType fieldType) |
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() |
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() |
UInt4Vector |
getOffsetVector() |
int |
getValueCapacity()
Returns the maximum number of values that can be stored in this vector instance.
|
Iterator<ValueVector> |
iterator() |
void |
reAlloc()
Allocate new buffer with double capacity, and copy data into the new buffer.
|
protected void |
replaceDataVector(FieldVector v) |
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
getAccessor, getMutator
allocateNew, close, getAllocator, getDataBuffer, getField, getMinorType, getOffsetBuffer, getReader, getTransferPair, getTransferPair, getTransferPair, getValidityBuffer, makeTransferPair
forEach, spliterator
public 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 final CallBack callBack
protected BaseRepeatedValueVector(String name, BufferAllocator allocator, CallBack callBack)
protected BaseRepeatedValueVector(String name, BufferAllocator allocator, FieldVector vector, CallBack callBack)
public boolean allocateNewSafe()
ValueVector
allocateNewSafe
in interface ValueVector
public void reAlloc()
ValueVector
reAlloc
in interface ValueVector
public UInt4Vector getOffsetVector()
getOffsetVector
in interface RepeatedValueVector
public FieldVector getDataVector()
getDataVector
in interface RepeatedValueVector
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 fieldType)
protected void replaceDataVector(FieldVector v)
Copyright © 2017 The Apache Software Foundation. All rights reserved.