java.lang.Object
org.apache.arrow.vector.BaseValueVector
org.apache.arrow.vector.BaseFixedWidthVector
org.apache.arrow.vector.TimeStampVector
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<ValueVector>
,ElementAddressableVector
,FieldVector
,FixedWidthVector
,ValueVector
,VectorDefinitionSetter
- Direct Known Subclasses:
TimeStampMicroTZVector
,TimeStampMicroVector
,TimeStampMilliTZVector
,TimeStampMilliVector
,TimeStampNanoTZVector
,TimeStampNanoVector
,TimeStampSecTZVector
,TimeStampSecVector
TimeStampVector is an abstract interface for fixed width vector (8 bytes) of timestamp values
which could be null. A validity buffer (bit vector) is maintained to track which elements in the
vector are null.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
-
Field Summary
Fields inherited from class org.apache.arrow.vector.BaseFixedWidthVector
actualValueCapacity, field, lastValueCapacity, validityBuffer, valueBuffer, valueCount
Fields inherited from class org.apache.arrow.vector.BaseValueVector
allocator, fieldReader, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY
-
Constructor Summary
ConstructorDescriptionTimeStampVector
(String name, FieldType fieldType, BufferAllocator allocator) Instantiate a TimeStampVector.TimeStampVector
(Field field, BufferAllocator allocator) Instantiate a TimeStampVector. -
Method Summary
Modifier and TypeMethodDescriptionlong
get
(int index) Get the element at the given index from the vector.static long
Given a data buffer, get the value stored at a particular position in the vector.void
set
(int index, int isSet, long value) Store the given value at a particular position in the vector.void
set
(int index, long value) Set the element at the given index to the given value.void
setSafe
(int index, int isSet, long value) Same asset(int, int, long)
except that it handles the case when index is greater than or equal to current value capacity of the vector.void
setSafe
(int index, long value) Same asset(int, long)
except that it handles the case when index is greater than or equal to existing value capacityBaseFixedWidthVector.getValueCapacity()
.protected void
setValue
(int index, long value) Methods inherited from class org.apache.arrow.vector.BaseFixedWidthVector
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, 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
Methods inherited from class org.apache.arrow.vector.BaseValueVector
checkBufRefs, getAllocator, getReader, getReaderImpl, getValidityBufferSizeFromCount, iterator, releaseBuffer, toString, transferBuffer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.arrow.vector.FieldVector
exportBuffer, exportCDataBuffers, getExportedCDataBufferCount
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.apache.arrow.vector.ValueVector
getAllocator, getMinorType, getObject, getReader, makeTransferPair, validate, validateFull
-
Field Details
-
TYPE_WIDTH
public static final byte TYPE_WIDTH- See Also:
-
-
Constructor Details
-
TimeStampVector
Instantiate a TimeStampVector. This doesn't allocate any memory for the data in vector.- Parameters:
name
- name of the vectorfieldType
- type of Field materialized by this vectorallocator
- allocator for memory management.
-
TimeStampVector
Instantiate a TimeStampVector. This doesn't allocate any memory for the data in vector.- Parameters:
field
- field materialized by this vectorallocator
- allocator for memory management.
-
-
Method Details
-
get
Get the element at the given index from the vector.- Parameters:
index
- position of element- Returns:
- element at given index
- Throws:
IllegalStateException
-
setValue
protected void setValue(int index, long value) -
set
public void set(int index, long value) Set the element at the given index to the given value.- Parameters:
index
- position of elementvalue
- value of element
-
setSafe
public void setSafe(int index, long value) Same asset(int, long)
except that it handles the case when index is greater than or equal to existing value capacityBaseFixedWidthVector.getValueCapacity()
.- Parameters:
index
- position of elementvalue
- value of element
-
set
public void set(int index, int isSet, long value) Store the given value at a particular position in the vector. isSet indicates whether the value is NULL or not.- Parameters:
index
- position of the new valueisSet
- 0 for NULL value, 1 otherwisevalue
- element value
-
setSafe
public void setSafe(int index, int isSet, long value) Same asset(int, int, long)
except that it handles the case when index is greater than or equal to current value capacity of the vector.- Parameters:
index
- position of the new valueisSet
- 0 for NULL value, 1 otherwisevalue
- element value
-
get
Given a data buffer, get the value stored at a particular position in the vector.This method should not be used externally.
- Parameters:
buffer
- data bufferindex
- position of the element.- Returns:
- value stored at the index.
-