Package org.apache.drill.exec.vector
Class IntervalVector.Mutator
java.lang.Object
org.apache.drill.exec.vector.BaseValueVector.BaseMutator
org.apache.drill.exec.vector.IntervalVector.Mutator
- All Implemented Interfaces:
ValueVector.Mutator
- Enclosing class:
IntervalVector
Interval.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
IntervalVector.VALUE_WIDTH(= 16) byte(s). - The equivalent Java primitive is 'DrillBuf'
-
Method Summary
Modifier and TypeMethodDescriptionvoidgenerateTestData(int count) voidset(int index, int months, int days, int milliseconds) voidSet the element at the given index to the given value.protected voidset(int index, IntervalHolder holder) protected voidset(int index, NullableIntervalHolder holder) voidsetSafe(int index, int months, int days, int milliseconds) voidvoidsetSafe(int index, IntervalHolder holder) voidsetSafe(int index, NullableIntervalHolder holder) voidsetValueCount(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
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
-
set
public void set(int index, int months, int days, int milliseconds) -
setSafe
public void setSafe(int index, int months, int days, int milliseconds) -
set
-
setSafe
-
set
-
setSafe
-
generateTestData
public void generateTestData(int count) - Specified by:
generateTestDatain interfaceValueVector.Mutator- Overrides:
generateTestDatain classBaseValueVector.BaseMutator
-
setValueCount
public void setValueCount(int valueCount) Description copied from interface:ValueVector.MutatorSets 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.
-