Package org.apache.drill.exec.vector
Class DateVector.Mutator
java.lang.Object
org.apache.drill.exec.vector.BaseValueVector.BaseMutator
org.apache.drill.exec.vector.DateVector.Mutator
- All Implemented Interfaces:
ValueVector.Mutator
- Enclosing class:
- DateVector
Date.Mutator implements a mutable vector of fixed width values.
Elements in the vector are accessed by position from the logical start of
the vector. Values should be pushed onto the vector sequentially, but may
be randomly accessed.
- The width of each element is
DateVector.VALUE_WIDTH
(= 8) byte(s). - The equivalent Java primitive is 'long'
-
Method Summary
Modifier and TypeMethodDescriptionvoid
generateTestData
(int size) void
generateTestDataAlt
(int size) void
set
(int index, long value) Set the element at the given index to the given value.protected void
set
(int index, DateHolder holder) protected void
set
(int index, NullableDateHolder holder) void
setSafe
(int index, long value) Set the value of a required or nullable vector.void
setSafe
(int index, DateHolder holder) void
setSafe
(int index, NullableDateHolder holder) void
setValueCount
(int valueCount) Sets the number of values that is stored in this vector to the given value count.Methods inherited from class org.apache.drill.exec.vector.BaseValueVector.BaseMutator
exchange, reset
-
Method Details
-
set
public void set(int index, long value) Set the element at the given index to the given value. Note that widths smaller than 32 bits are handled by the DrillBuf interface.- Parameters:
index
- position of the bit to setvalue
- value to set
-
setSafe
public void setSafe(int index, long value) Set the value of a required or nullable vector. Grows the vector as needed. Does not enforce size limits; scalar fixed-width types can never overflow a vector.- Parameters:
index
- item to write
-
set
-
setSafe
-
set
-
setSafe
-
generateTestData
public void generateTestData(int size) - Specified by:
generateTestData
in interfaceValueVector.Mutator
- Overrides:
generateTestData
in classBaseValueVector.BaseMutator
-
generateTestDataAlt
public void generateTestDataAlt(int size) -
setValueCount
public void setValueCount(int valueCount) Description copied from interface:ValueVector.Mutator
Sets the number of values that is stored in this vector to the given value count. WARNING! Once the valueCount is set, the vector should be considered immutable.- Parameters:
valueCount
- value count to set.
-