public class ListVector extends BaseRepeatedValueVector implements FieldVector, PromotableVector
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected ArrowBuf |
validityBuffer |
DATA_VECTOR_NAME, DEFAULT_DATA_VECTOR, OFFSET_WIDTH, offsetAllocationSizeInBytes, offsetBuffer, valueCount, vectorallocator, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, nameDEFAULT_REPEAT_PER_RECORD| コンストラクタと説明 |
|---|
ListVector(String name,
BufferAllocator allocator,
CallBack callBack)
非推奨です。
|
ListVector(String name,
BufferAllocator allocator,
DictionaryEncoding dictionary,
CallBack callBack)
非推奨です。
|
ListVector(String name,
BufferAllocator allocator,
FieldType fieldType,
CallBack callBack) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
<T extends ValueVector> |
addOrGetVector(FieldType fieldType) |
void |
allocateNew()
Same as
allocateNewSafe(). |
boolean |
allocateNewSafe()
Allocate memory for the vector.
|
void |
clear()
Release any owned ArrowBuf and reset the ValueVector to the initial state.
|
void |
copyFrom(int inIndex,
int outIndex,
ListVector from)
Copy a cell value from a particular index in source vector to a particular
position in this vector
|
void |
copyFromSafe(int inIndex,
int outIndex,
ListVector from)
Same as
copyFrom(int, int, ListVector) except that
it handles the case when the capacity of the vector needs to be expanded
before copy. |
static ListVector |
empty(String name,
BufferAllocator allocator) |
void |
endValue(int index,
int size)
End the current value
|
ArrowBuf[] |
getBuffers(boolean clear)
Return the underlying buffers associated with this vector.
|
int |
getBufferSize()
Get the size (number of bytes) of underlying buffers used by this
vector
|
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()
Get the inner data vector for this list vector
|
double |
getDensity()
Get the density of this ListVector
|
Field |
getField()
Get information about how this field is materialized.
|
List<ArrowBuf> |
getFieldBuffers()
Get the buffers belonging to this vector
|
List<BufferBacked> |
getFieldInnerVectors()
非推奨です。
|
int |
getLastSet() |
Types.MinorType |
getMinorType() |
int |
getNullCount()
Get the number of elements that are null in the vector
|
Object |
getObject(int index)
Get the element in the list vector at a particular index
|
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
|
int |
getValueCapacity()
Get the current value capacity for the vector
|
UnionListWriter |
getWriter() |
void |
initializeChildrenFromFields(List<Field> children)
Initializes the child vectors
to be later loaded with loadBuffers
|
boolean |
isNull(int index)
Check if element at given index is null.
|
int |
isSet(int index)
Same as
isNull(int). |
void |
loadFieldBuffers(ArrowFieldNode fieldNode,
List<ArrowBuf> ownBuffers)
Load the buffers of this vector with provided source buffers.
|
TransferPair |
makeTransferPair(ValueVector target)
makes a new transfer pair used to transfer underlying buffers
|
UnionVector |
promoteToUnion() |
void |
reAlloc()
Resize the vector to increase the capacity.
|
void |
reset()
Reset the ValueVector to the initial state without releasing any owned ArrowBuf.
|
void |
setInitialCapacity(int numRecords)
Set the initial record capacity
|
void |
setInitialCapacity(int numRecords,
double density)
Specialized version of setInitialCapacity() for ListVector.
|
void |
setLastSet(int value) |
void |
setNotNull(int index) |
void |
setValueCount(int valueCount)
Sets the value count for the vector
|
int |
startNewValue(int index)
Start a new value in the list vector
|
allocateOffsetBuffer, getBufferSizeFor, getInnerValueCount, getInnerValueCountAt, getOffsetBufferValueCapacity, getOffsetVector, getValueCount, isEmpty, iterator, reallocOffsetBuffer, replaceDataVector, sizecheckBufRefs, close, compareTypes, getAllocator, getTransferPair, getValidityBufferSizeFromCount, releaseBuffer, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, getAllocator, getBufferSizeFor, getTransferPair, getValueCountforEach, iterator, spliteratorprotected ArrowBuf validityBuffer
@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 インタフェース内 FieldVectorchildren - the schemapublic void setInitialCapacity(int numRecords)
ValueVectorsetInitialCapacity インタフェース内 ValueVectorsetInitialCapacity クラス内 BaseRepeatedValueVectornumRecords - the initial record capacity.public void setInitialCapacity(int numRecords,
double density)
setInitialCapacity インタフェース内 DensityAwareVectorsetInitialCapacity クラス内 BaseRepeatedValueVectornumRecords - value countdensity - density of ListVector. Density is the average size of
list per position in the List vector. For example, a
density value of 10 implies each position in the list
vector has a list of 10 values.
A density value of 0.1 implies out of 10 positions in
the list vector, 1 position has a list of size 1 and
remaining positions are null (no lists) or empty lists.
This helps in tightly controlling the memory we provision
for inner data vector.public double getDensity()
public List<FieldVector> getChildrenFromFields()
FieldVectorgetChildrenFromFields インタフェース内 FieldVectorpublic void loadFieldBuffers(ArrowFieldNode fieldNode, List<ArrowBuf> ownBuffers)
loadFieldBuffers インタフェース内 FieldVectorfieldNode - the fieldNode indicating the value countownBuffers - the buffers for this Field (own buffers only, children not included)public List<ArrowBuf> getFieldBuffers()
getFieldBuffers インタフェース内 FieldVector@Deprecated public List<BufferBacked> getFieldInnerVectors()
getFieldInnerVectors インタフェース内 FieldVectorpublic UnionListWriter getWriter()
public void allocateNew()
throws OutOfMemoryException
allocateNewSafe().allocateNew インタフェース内 ValueVectorOutOfMemoryException - Thrown if no memory can be allocated.public boolean allocateNewSafe()
allocateNewSafe インタフェース内 ValueVectorallocateNewSafe クラス内 BaseRepeatedValueVectorpublic void reAlloc()
reAlloc インタフェース内 ValueVectorreAlloc クラス内 BaseRepeatedValueVectorpublic void copyFromSafe(int inIndex,
int outIndex,
ListVector from)
copyFrom(int, int, ListVector) except that
it handles the case when the capacity of the vector needs to be expanded
before copy.inIndex - position to copy from in source vectoroutIndex - position to copy to in this vectorfrom - source vectorpublic void copyFrom(int inIndex,
int outIndex,
ListVector from)
inIndex - position to copy from in source vectoroutIndex - position to copy to in this vectorfrom - source vectorpublic FieldVector getDataVector()
getDataVector インタフェース内 RepeatedValueVectorgetDataVector クラス内 BaseRepeatedValueVectorpublic TransferPair getTransferPair(String ref, BufferAllocator allocator)
getTransferPair インタフェース内 ValueVectorpublic TransferPair getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
getTransferPair インタフェース内 ValueVectorpublic TransferPair makeTransferPair(ValueVector target)
ValueVectormakeTransferPair インタフェース内 ValueVectortarget - the target for the transfertransfer pair that is used to transfer underlying
buffers into the target vector.public long getValidityBufferAddress()
FieldVectorgetValidityBufferAddress インタフェース内 FieldVectorpublic long getDataBufferAddress()
FieldVectorgetDataBufferAddress インタフェース内 FieldVectorpublic long getOffsetBufferAddress()
FieldVectorgetOffsetBufferAddress インタフェース内 FieldVectorpublic ArrowBuf getValidityBuffer()
ValueVectorgetValidityBuffer インタフェース内 ValueVectorpublic ArrowBuf getDataBuffer()
ValueVectorgetDataBuffer インタフェース内 ValueVectorpublic ArrowBuf getOffsetBuffer()
ValueVectorgetOffsetBuffer インタフェース内 ValueVectorpublic UnionListReader getReader()
getReader インタフェース内 ValueVectorfield reader that supports reading values
from this vector.public <T extends ValueVector> AddOrGetResult<T> addOrGetVector(FieldType fieldType)
addOrGetVector インタフェース内 PromotableVectoraddOrGetVector クラス内 BaseRepeatedValueVectorpublic int getBufferSize()
getBufferSize インタフェース内 ValueVectorgetBufferSize クラス内 BaseRepeatedValueVectorpublic Field getField()
ValueVectorgetField インタフェース内 ValueVectorpublic Types.MinorType getMinorType()
getMinorType インタフェース内 ValueVectorpublic void clear()
ValueVectorclear インタフェース内 ValueVectorclear クラス内 BaseRepeatedValueVectorpublic void reset()
ValueVectorreset インタフェース内 ValueVectorreset クラス内 BaseRepeatedValueVectorpublic ArrowBuf[] getBuffers(boolean clear)
getBuffers インタフェース内 ValueVectorgetBuffers クラス内 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 インタフェース内 PromotableVectorpublic Object getObject(int index)
getObject インタフェース内 ValueVectorindex - position of the elementpublic boolean isNull(int index)
isNull インタフェース内 ValueVectorisNull クラス内 BaseRepeatedValueVectorindex - position of elementpublic int isSet(int index)
isNull(int).index - position of elementpublic int getNullCount()
getNullCount インタフェース内 ValueVectorpublic int getValueCapacity()
getValueCapacity インタフェース内 ValueVectorgetValueCapacity クラス内 BaseRepeatedValueVectorpublic void setNotNull(int index)
public int startNewValue(int index)
startNewValue クラス内 BaseRepeatedValueVectorindex - index of the value to startpublic void endValue(int index,
int size)
index - index of the value to endsize - number of elements in the list that was writtenpublic void setValueCount(int valueCount)
setValueCount インタフェース内 ValueVectorsetValueCount クラス内 BaseRepeatedValueVectorvalueCount - value countpublic void setLastSet(int value)
public int getLastSet()
Copyright © 2018 The Apache Software Foundation. All rights reserved.