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
Fields inherited from class org.apache.arrow.vector.NullVector
field
-
Constructor Summary
ConstructorDescriptionDeprecated.ZeroVector
(String name) Instantiate a ZeroVector.ZeroVector
(String name, FieldType fieldType) Instantiate a ZeroVector.ZeroVector
(Field field) Instantiate a ZeroVector. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns 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.int
Returns the maximum number of values that can be stored in this vector instance.int
Gets the number of values.int
hashCode
(int index) Returns hashCode of element in index with the default hasher.int
hashCode
(int index, ArrowBufHasher hasher) Returns hashCode of element in index with the given hasher.boolean
isNull
(int index) Check whether an element in the vector is null.makeTransferPair
(ValueVector target) Makes a new transfer pair used to transfer underlying buffers.void
setValueCount
(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, setNull
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.arrow.vector.FieldVector
exportBuffer, exportCDataBuffers, getExportedCDataBufferCount
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.apache.arrow.vector.ValueIterableVector
getValueIterable, getValueIterator
Methods 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:ValueVector
Gets the number of values.- Specified by:
getValueCount
in interfaceValueVector
- Overrides:
getValueCount
in classNullVector
- Returns:
- number of values in the vector
-
setValueCount
public void setValueCount(int valueCount) Description copied from interface:ValueVector
Set number of values in the vector.- Specified by:
setValueCount
in interfaceValueVector
- Overrides:
setValueCount
in classNullVector
-
getNullCount
public int getNullCount()Description copied from interface:ValueVector
Returns number of null elements in the vector.- Specified by:
getNullCount
in interfaceValueVector
- Overrides:
getNullCount
in classNullVector
- Returns:
- number of null elements
-
isNull
public boolean isNull(int index) Description copied from interface:ValueVector
Check whether an element in the vector is null.- Specified by:
isNull
in interfaceValueVector
- Overrides:
isNull
in classNullVector
- Parameters:
index
- index to check for null- Returns:
- true if element is null
-
hashCode
public int hashCode(int index) Description copied from interface:ValueVector
Returns hashCode of element in index with the default hasher.- Specified by:
hashCode
in interfaceValueVector
- Overrides:
hashCode
in classNullVector
-
hashCode
Description copied from interface:ValueVector
Returns hashCode of element in index with the given hasher.- Specified by:
hashCode
in interfaceValueVector
- Overrides:
hashCode
in classNullVector
-
getValueCapacity
public int getValueCapacity()Description copied from interface:ValueVector
Returns the maximum number of values that can be stored in this vector instance.- Specified by:
getValueCapacity
in interfaceValueVector
- Overrides:
getValueCapacity
in classNullVector
- Returns:
- the maximum number of values that can be stored in this vector instance.
-
getTransferPair
Description copied from interface:ValueVector
To transfer quota responsibility.- Specified by:
getTransferPair
in interfaceValueVector
- Overrides:
getTransferPair
in classNullVector
- Parameters:
allocator
- the target allocator- Returns:
- a
transfer pair
, creating a new target vector of the same type.
-
getTransferPair
Description copied from interface:ValueVector
To transfer quota responsibility.- Specified by:
getTransferPair
in interfaceValueVector
- Overrides:
getTransferPair
in 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:ValueVector
To transfer quota responsibility.- Specified by:
getTransferPair
in interfaceValueVector
- Overrides:
getTransferPair
in 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:ValueVector
Makes a new transfer pair used to transfer underlying buffers.- Specified by:
makeTransferPair
in interfaceValueVector
- Overrides:
makeTransferPair
in classNullVector
- Parameters:
target
- the target for the transfer- Returns:
- a new
transfer pair
that is used to transfer underlying buffers into the target vector.
-