public final class Float2Vector extends BaseFixedWidthVector implements FloatingPointVector
Modifier and Type | Field and Description |
---|---|
static byte |
TYPE_WIDTH |
actualValueCapacity, field, lastValueCapacity, validityBuffer, valueBuffer, valueCount
allocator, fieldReader, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY
Constructor and Description |
---|
Float2Vector(Field field,
BufferAllocator allocator)
Instantiate a Float2Vector.
|
Float2Vector(String name,
BufferAllocator allocator)
Instantiate a Float2Vector.
|
Float2Vector(String name,
FieldType fieldType,
BufferAllocator allocator)
Instantiate a Float2Vector.
|
Modifier and Type | Method and Description |
---|---|
short |
get(int index)
Get the element at the given index from the vector.
|
void |
get(int index,
NullableFloat2Holder holder)
Get the element at the given index from the vector and
sets the state in holder.
|
Types.MinorType |
getMinorType()
Get minor type for this vector.
|
Short |
getObject(int index)
Same as
get(int) . |
protected FieldReader |
getReaderImpl()
Each vector has a different reader that implements the FieldReader interface.
|
TransferPair |
getTransferPair(Field field,
BufferAllocator allocator)
Construct a TransferPair comprising this and a target vector of
the same type.
|
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator)
Construct a TransferPair comprising this and a target vector of
the same type.
|
double |
getValueAsDouble(int index)
Gets the value at the given index.
|
float |
getValueAsFloat(int index) |
TransferPair |
makeTransferPair(ValueVector to)
Construct a TransferPair with a desired target vector of the same type.
|
void |
set(int index,
Float2Holder holder)
Set the element at the given index to the value set in data holder.
|
void |
set(int index,
int isSet,
short value)
Store the given value at a particular position in the vector.
|
void |
set(int index,
NullableFloat2Holder holder)
Set the element at the given index to the value set in data holder.
|
void |
set(int index,
short value)
Set the element at the given index to the given value.
|
void |
setSafe(int index,
Float2Holder holder)
Same as
set(int, Float2Holder) except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity() . |
void |
setSafe(int index,
int isSet,
short value)
Same as
set(int, int, short) except that it handles the case
when index is greater than or equal to current value capacity of the
vector. |
void |
setSafe(int index,
NullableFloat2Holder holder)
Same as
set(int, NullableFloat2Holder) except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity() . |
void |
setSafe(int index,
short value)
Same as
set(int, short) except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity() . |
void |
setSafeWithPossibleTruncate(int index,
double value)
Sets the value at the given index, note this value may be truncated internally.
|
void |
setSafeWithPossibleTruncate(int index,
float value)
Same as
setWithPossibleTruncate(int, float) except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity() . |
void |
setSafeWithPossibleTruncate(int index,
int isSet,
float value)
Same as
set(int, int, short) except that it handles the case
when index is greater than or equal to current value capacity of the
vector. |
void |
setWithPossibleTruncate(int index,
double value)
Sets the value at the given index, note this value may be truncated internally.
|
void |
setWithPossibleTruncate(int index,
float value)
Set the element at the given index to the given value.
|
void |
setWithPossibleTruncate(int index,
int isSet,
float value)
Store the given value at a particular position in the vector.
|
accept, allocateNew, allocateNew, allocateNewSafe, clear, close, copyFrom, copyFromSafe, decrementAllocationMonitor, getBuffers, getBufferSize, getBufferSizeFor, getChildrenFromFields, getDataBuffer, getDataBufferAddress, getDataPointer, getDataPointer, getField, getFieldBuffers, getFieldInnerVectors, getName, getNullCount, getOffsetBuffer, getOffsetBufferAddress, getTransferPair, getTransferPair, getTransferPair, getTypeWidth, getValidityBuffer, getValidityBufferAddress, getValidityBufferValueCapacity, getValueBufferValueCapacity, getValueCapacity, getValueCount, handleSafe, hashCode, hashCode, incrementAllocationMonitor, initializeChildrenFromFields, isNull, isSafe, isSet, loadFieldBuffers, reAlloc, refreshValueCapacity, reset, set, set, setIndexDefined, setInitialCapacity, setNull, setSafe, setSafe, setValueCount, splitAndTransferTo, transferTo, validateScalars, zeroVector
checkBufRefs, getAllocator, getReader, getValidityBufferSizeFromCount, iterator, releaseBuffer, toString, transferBuffer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept, allocateNew, allocateNewSafe, clear, close, copyFrom, copyFromSafe, getAllocator, getBuffers, getBufferSize, getBufferSizeFor, getDataBuffer, getField, getName, getNullCount, getOffsetBuffer, getReader, getTransferPair, getTransferPair, getTransferPair, getValidityBuffer, getValueCapacity, getValueCount, hashCode, hashCode, isNull, reAlloc, reset, setInitialCapacity, setValueCount, validate, validateFull
forEach, iterator, spliterator
exportBuffer, exportCDataBuffers
public static final byte TYPE_WIDTH
public Float2Vector(String name, BufferAllocator allocator)
name
- name of the vectorallocator
- allocator for memory management.public Float2Vector(String name, FieldType fieldType, BufferAllocator allocator)
name
- name of the vectorfieldType
- type of Field materialized by this vectorallocator
- allocator for memory management.public Float2Vector(Field field, BufferAllocator allocator)
field
- field materialized by this vectorallocator
- allocator for memory management.protected FieldReader getReaderImpl()
BaseValueVector
getReaderImpl
in class BaseValueVector
public Types.MinorType getMinorType()
getMinorType
in interface ValueVector
Types.MinorType
public short get(int index) throws IllegalStateException
index
- position of elementIllegalStateException
public void get(int index, NullableFloat2Holder holder)
index
- position of elementpublic Short getObject(int index)
get(int)
.getObject
in interface ValueVector
index
- position of elementpublic double getValueAsDouble(int index)
FloatingPointVector
getValueAsDouble
in interface FloatingPointVector
index
- the index to retrieve the value.public float getValueAsFloat(int index)
public void set(int index, short value)
index
- position of elementvalue
- value of elementpublic void setWithPossibleTruncate(int index, float value)
index
- position of elementvalue
- value of elementpublic void set(int index, NullableFloat2Holder holder) throws IllegalArgumentException
index
- position of elementholder
- nullable data holder for value of elementIllegalArgumentException
public void set(int index, Float2Holder holder)
index
- position of elementholder
- data holder for value of elementpublic void setSafe(int index, short value)
set(int, short)
except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity()
.index
- position of elementvalue
- value of elementpublic void setSafeWithPossibleTruncate(int index, float value)
setWithPossibleTruncate(int, float)
except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity()
.index
- position of elementvalue
- value of elementpublic void setSafe(int index, NullableFloat2Holder holder) throws IllegalArgumentException
set(int, NullableFloat2Holder)
except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity()
.index
- position of elementholder
- nullable data holder for value of elementIllegalArgumentException
public void setSafe(int index, Float2Holder holder)
set(int, Float2Holder)
except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity()
.index
- position of elementholder
- data holder for value of elementpublic void set(int index, int isSet, short value)
index
- position of the new valueisSet
- 0 for NULL value, 1 otherwisevalue
- element valuepublic void setWithPossibleTruncate(int index, int isSet, float value)
index
- position of the new valueisSet
- 0 for NULL value, 1 otherwisevalue
- element valuepublic void setSafe(int index, int isSet, short value)
set(int, int, short)
except that it handles the case
when index is greater than or equal to current value capacity of the
vector.index
- position of the new valueisSet
- 0 for NULL value, 1 otherwisevalue
- element valuepublic void setSafeWithPossibleTruncate(int index, int isSet, float value)
set(int, int, short)
except that it handles the case
when index is greater than or equal to current value capacity of the
vector.index
- position of the new valueisSet
- 0 for NULL value, 1 otherwisevalue
- element valuepublic void setWithPossibleTruncate(int index, double value)
FloatingPointVector
setWithPossibleTruncate
in interface FloatingPointVector
index
- the index to set.value
- the value to set.public void setSafeWithPossibleTruncate(int index, double value)
FloatingPointVector
setSafeWithPossibleTruncate
in interface FloatingPointVector
index
- the index to set.value
- the value to set.public TransferPair getTransferPair(String ref, BufferAllocator allocator)
getTransferPair
in interface ValueVector
getTransferPair
in class BaseFixedWidthVector
ref
- name of the target vectorallocator
- allocator for the target vectorTransferPair
public TransferPair getTransferPair(Field field, BufferAllocator allocator)
getTransferPair
in interface ValueVector
getTransferPair
in class BaseFixedWidthVector
field
- Field object used by the target vectorallocator
- allocator for the target vectorTransferPair
public TransferPair makeTransferPair(ValueVector to)
makeTransferPair
in interface ValueVector
to
- target vectorTransferPair
Copyright © 2024 The Apache Software Foundation. All rights reserved.