public class ListVector extends BaseRepeatedValueVector implements FieldVector, PromotableVector
修飾子とタイプ | フィールドと説明 |
---|---|
protected ArrowBuf |
validityBuffer |
DATA_VECTOR_NAME, DEFAULT_DATA_VECTOR, OFFSET_WIDTH, offsetAllocationSizeInBytes, offsetBuffer, valueCount, vector
allocator, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, name
DEFAULT_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, size
checkBufRefs, close, compareTypes, getAllocator, getTransferPair, getValidityBufferSizeFromCount, releaseBuffer, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, getAllocator, getBufferSizeFor, getTransferPair, getValueCount
forEach, iterator, spliterator
protected 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)
FieldVector
initializeChildrenFromFields
インタフェース内 FieldVector
children
- the schemapublic void setInitialCapacity(int numRecords)
ValueVector
setInitialCapacity
インタフェース内 ValueVector
setInitialCapacity
クラス内 BaseRepeatedValueVector
numRecords
- the initial record capacity.public void setInitialCapacity(int numRecords, double density)
setInitialCapacity
インタフェース内 DensityAwareVector
setInitialCapacity
クラス内 BaseRepeatedValueVector
numRecords
- 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()
FieldVector
getChildrenFromFields
インタフェース内 FieldVector
public void loadFieldBuffers(ArrowFieldNode fieldNode, List<ArrowBuf> ownBuffers)
loadFieldBuffers
インタフェース内 FieldVector
fieldNode
- 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
インタフェース内 FieldVector
public UnionListWriter getWriter()
public void allocateNew() throws OutOfMemoryException
allocateNewSafe()
.allocateNew
インタフェース内 ValueVector
OutOfMemoryException
- Thrown if no memory can be allocated.public boolean allocateNewSafe()
allocateNewSafe
インタフェース内 ValueVector
allocateNewSafe
クラス内 BaseRepeatedValueVector
public void reAlloc()
reAlloc
インタフェース内 ValueVector
reAlloc
クラス内 BaseRepeatedValueVector
public 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
インタフェース内 RepeatedValueVector
getDataVector
クラス内 BaseRepeatedValueVector
public TransferPair getTransferPair(String ref, BufferAllocator allocator)
getTransferPair
インタフェース内 ValueVector
public TransferPair getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
getTransferPair
インタフェース内 ValueVector
public TransferPair makeTransferPair(ValueVector target)
ValueVector
makeTransferPair
インタフェース内 ValueVector
target
- the target for the transfertransfer pair
that is used to transfer underlying
buffers into the target vector.public long getValidityBufferAddress()
FieldVector
getValidityBufferAddress
インタフェース内 FieldVector
public long getDataBufferAddress()
FieldVector
getDataBufferAddress
インタフェース内 FieldVector
public long getOffsetBufferAddress()
FieldVector
getOffsetBufferAddress
インタフェース内 FieldVector
public ArrowBuf getValidityBuffer()
ValueVector
getValidityBuffer
インタフェース内 ValueVector
public ArrowBuf getDataBuffer()
ValueVector
getDataBuffer
インタフェース内 ValueVector
public ArrowBuf getOffsetBuffer()
ValueVector
getOffsetBuffer
インタフェース内 ValueVector
public UnionListReader getReader()
getReader
インタフェース内 ValueVector
field reader
that supports reading values
from this vector.public <T extends ValueVector> AddOrGetResult<T> addOrGetVector(FieldType fieldType)
addOrGetVector
インタフェース内 PromotableVector
addOrGetVector
クラス内 BaseRepeatedValueVector
public int getBufferSize()
getBufferSize
インタフェース内 ValueVector
getBufferSize
クラス内 BaseRepeatedValueVector
public Field getField()
ValueVector
getField
インタフェース内 ValueVector
public Types.MinorType getMinorType()
getMinorType
インタフェース内 ValueVector
public void clear()
ValueVector
clear
インタフェース内 ValueVector
clear
クラス内 BaseRepeatedValueVector
public void reset()
ValueVector
reset
インタフェース内 ValueVector
reset
クラス内 BaseRepeatedValueVector
public ArrowBuf[] getBuffers(boolean clear)
getBuffers
インタフェース内 ValueVector
getBuffers
クラス内 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
インタフェース内 PromotableVector
public Object getObject(int index)
getObject
インタフェース内 ValueVector
index
- position of the elementpublic boolean isNull(int index)
isNull
インタフェース内 ValueVector
isNull
クラス内 BaseRepeatedValueVector
index
- position of elementpublic int isSet(int index)
isNull(int)
.index
- position of elementpublic int getNullCount()
getNullCount
インタフェース内 ValueVector
public int getValueCapacity()
getValueCapacity
インタフェース内 ValueVector
getValueCapacity
クラス内 BaseRepeatedValueVector
public void setNotNull(int index)
public int startNewValue(int index)
startNewValue
クラス内 BaseRepeatedValueVector
index
- 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
インタフェース内 ValueVector
setValueCount
クラス内 BaseRepeatedValueVector
valueCount
- value countpublic void setLastSet(int value)
public int getLastSet()
Copyright © 2018 The Apache Software Foundation. All rights reserved.