java.lang.Object
org.apache.arrow.vector.NullVector
org.apache.arrow.vector.ZeroVector
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<ValueVector>,FieldVector,ValueIterableVector<Object>,ValueVector
A zero length vector of any type.
-
Field Summary
FieldsFields inherited from class org.apache.arrow.vector.NullVector
field -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.ZeroVector(String name) Instantiate a ZeroVector.ZeroVector(String name, FieldType fieldType) Instantiate a ZeroVector.ZeroVector(Field field) Instantiate a ZeroVector. -
Method Summary
Modifier and TypeMethodDescriptionintReturns number of null elements in the vector.getTransferPair(String ref, BufferAllocator allocator) To transfer quota responsibility.getTransferPair(String ref, BufferAllocator allocator, CallBack callBack) To transfer quota responsibility.getTransferPair(BufferAllocator allocator) To transfer quota responsibility.intReturns the maximum number of values that can be stored in this vector instance.intGets the number of values.inthashCode(int index) Returns hashCode of element in index with the default hasher.inthashCode(int index, ArrowBufHasher hasher) Returns hashCode of element in index with the given hasher.booleanisNull(int index) Check whether an element in the vector is null.makeTransferPair(ValueVector target) Makes a new transfer pair used to transfer underlying buffers.voidsetValueCount(int valueCount) Set number of values in the vector.Methods inherited from class org.apache.arrow.vector.NullVector
accept, allocateNew, allocateNewSafe, clear, close, copyFrom, copyFromSafe, getAllocator, getBuffers, getBufferSize, getBufferSizeFor, getChildrenFromFields, getDataBuffer, getDataBufferAddress, getField, getFieldBuffers, getFieldInnerVectors, getMinorType, getName, getObject, getOffsetBuffer, getOffsetBufferAddress, getReader, getTransferPair, getTransferPair, getValidityBuffer, getValidityBufferAddress, initializeChildrenFromFields, iterator, loadFieldBuffers, reAlloc, reset, setInitialCapacity, setNullMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.arrow.vector.FieldVector
exportBuffer, exportCDataBuffers, getExportedCDataBufferCountMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.apache.arrow.vector.ValueIterableVector
getValueIterable, getValueIteratorMethods inherited from interface org.apache.arrow.vector.ValueVector
validate, validateFull
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ZeroVector
Instantiate a ZeroVector.- Parameters:
name- name of the vector
-
ZeroVector
Instantiate a ZeroVector.- Parameters:
name- name of the vectorfieldType- type of Field materialized by this vector.
-
ZeroVector
Instantiate a ZeroVector.- Parameters:
field- field materialized by this vector.
-
ZeroVector
Deprecated.
-
-
Method Details
-
getValueCount
public int getValueCount()Description copied from interface:ValueVectorGets the number of values.- Specified by:
getValueCountin interfaceValueVector- Overrides:
getValueCountin classNullVector- Returns:
- number of values in the vector
-
setValueCount
public void setValueCount(int valueCount) Description copied from interface:ValueVectorSet number of values in the vector.- Specified by:
setValueCountin interfaceValueVector- Overrides:
setValueCountin classNullVector
-
getNullCount
public int getNullCount()Description copied from interface:ValueVectorReturns number of null elements in the vector.- Specified by:
getNullCountin interfaceValueVector- Overrides:
getNullCountin classNullVector- Returns:
- number of null elements
-
isNull
public boolean isNull(int index) Description copied from interface:ValueVectorCheck whether an element in the vector is null.- Specified by:
isNullin interfaceValueVector- Overrides:
isNullin classNullVector- Parameters:
index- index to check for null- Returns:
- true if element is null
-
hashCode
public int hashCode(int index) Description copied from interface:ValueVectorReturns hashCode of element in index with the default hasher.- Specified by:
hashCodein interfaceValueVector- Overrides:
hashCodein classNullVector
-
hashCode
Description copied from interface:ValueVectorReturns hashCode of element in index with the given hasher.- Specified by:
hashCodein interfaceValueVector- Overrides:
hashCodein classNullVector
-
getValueCapacity
public int getValueCapacity()Description copied from interface:ValueVectorReturns the maximum number of values that can be stored in this vector instance.- Specified by:
getValueCapacityin interfaceValueVector- Overrides:
getValueCapacityin classNullVector- Returns:
- the maximum number of values that can be stored in this vector instance.
-
getTransferPair
Description copied from interface:ValueVectorTo transfer quota responsibility.- Specified by:
getTransferPairin interfaceValueVector- Overrides:
getTransferPairin classNullVector- Parameters:
allocator- the target allocator- Returns:
- a
transfer pair, creating a new target vector of the same type.
-
getTransferPair
Description copied from interface:ValueVectorTo transfer quota responsibility.- Specified by:
getTransferPairin interfaceValueVector- Overrides:
getTransferPairin classNullVector- Parameters:
ref- the name of the vectorallocator- the target allocator- Returns:
- a
transfer pair, creating a new target vector of the same type.
-
getTransferPair
Description copied from interface:ValueVectorTo transfer quota responsibility.- Specified by:
getTransferPairin interfaceValueVector- Overrides:
getTransferPairin classNullVector- Parameters:
ref- the name of the vectorallocator- the target allocatorcallBack- A schema change callback.- Returns:
- a
transfer pair, creating a new target vector of the same type.
-
makeTransferPair
Description copied from interface:ValueVectorMakes a new transfer pair used to transfer underlying buffers.- Specified by:
makeTransferPairin interfaceValueVector- Overrides:
makeTransferPairin classNullVector- Parameters:
target- the target for the transfer- Returns:
- a new
transfer pairthat is used to transfer underlying buffers into the target vector.
-