Package org.apache.drill.exec.vector
Class NullableVarCharVector.Mutator
java.lang.Object
org.apache.drill.exec.vector.BaseValueVector.BaseMutator
org.apache.drill.exec.vector.NullableVarCharVector.Mutator
- All Implemented Interfaces:
NullableVector.Mutator,NullableVectorDefinitionSetter,ValueVector.Mutator,VariableWidthVector.VariableWidthMutator
- Enclosing class:
NullableVarCharVector
public final class NullableVarCharVector.Mutator
extends BaseValueVector.BaseMutator
implements NullableVectorDefinitionSetter, VariableWidthVector.VariableWidthMutator, NullableVector.Mutator
-
Method Summary
Modifier and TypeMethodDescriptionvoidexchange(ValueVector.Mutator other) Exchanges state with the mutator of another mutator.protected voidfillEmpties(int index) Fill in missing values up to, but not including, the given index.voidfromNotNullable(VarCharVector srce) voidgenerateTestData(int valueCount) intbooleanisSafe(int outIndex) voidreset()Resets the mutator to pristine state.voidset(int index, byte[] value) Set the variable length element at the specified index to the supplied value.voidvoidset(int index, NullableVarCharHolder holder) voidset(int index, VarCharHolder holder) voidsetIndexDefined(int index) Set value at position "index" to be defined.voidsetIndexDefined(int index, int numValues) Set a contiguous set of values starting at position "index" to be defined.voidsetNull(int index) voidsetSafe(int index, byte[] value, int start, int length) voidvoidsetSafe(int index, ByteBuffer value, int start, int length) voidsetSafe(int index, NullableVarCharHolder value) voidsetSafe(int index, VarCharHolder value) voidsetSafe(VarLenBulkInput<VarLenBulkEntry> input) voidsetSetCount(int n) Used by the vector accessors to force the last set value.voidsetSkipNull(int index, NullableVarCharHolder holder) voidsetSkipNull(int index, VarCharHolder holder) voidsetValueCount(int valueCount) Sets the number of values that is stored in this vector to the given value count.voidsetValueLengthSafe(int index, int length)
-
Method Details
-
getVectorWithValues
-
setIndexDefined
public void setIndexDefined(int index) Description copied from interface:NullableVectorDefinitionSetterSet value at position "index" to be defined.- Specified by:
setIndexDefinedin interfaceNullableVectorDefinitionSetter- Parameters:
index- value position
-
setIndexDefined
public void setIndexDefined(int index, int numValues) Set a contiguous set of values starting at position "index" to be defined.- Specified by:
setIndexDefinedin interfaceNullableVectorDefinitionSetter- Parameters:
index- value positionnumValues- of contiguous values
-
set
public void set(int index, byte[] value) Set the variable length element at the specified index to the supplied value.- Parameters:
index- position of the bit to setvalue- value to write
-
fillEmpties
protected void fillEmpties(int index) Fill in missing values up to, but not including, the given index.- Parameters:
index- the index about to be written, or the total vector length about to be set
-
setValueLengthSafe
public void setValueLengthSafe(int index, int length) - Specified by:
setValueLengthSafein interfaceVariableWidthVector.VariableWidthMutator
-
setSafe
public void setSafe(int index, byte[] value, int start, int length) -
setSafe
-
setNull
public void setNull(int index) -
setSkipNull
-
setSkipNull
-
set
-
set
-
isSafe
public boolean isSafe(int outIndex) -
set
-
setSafe
-
setSafe
-
setSafe
-
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.- Specified by:
setValueCountin interfaceValueVector.Mutator- Parameters:
valueCount- value count to set.
-
setSafe
-
generateTestData
public void generateTestData(int valueCount) - Specified by:
generateTestDatain interfaceValueVector.Mutator- Overrides:
generateTestDatain classBaseValueVector.BaseMutator
-
reset
public void reset()Description copied from interface:ValueVector.MutatorResets the mutator to pristine state.- Specified by:
resetin interfaceValueVector.Mutator- Overrides:
resetin classBaseValueVector.BaseMutator
-
getLastSet
public int getLastSet() -
setSetCount
public void setSetCount(int n) Description copied from interface:NullableVector.MutatorUsed by the vector accessors to force the last set value.- Specified by:
setSetCountin interfaceNullableVector.Mutator- Parameters:
n- the value of the last set field used to fill empties
-
exchange
Description copied from interface:ValueVector.MutatorExchanges state with the mutator of another mutator. Used when exchanging state with another vector.- Specified by:
exchangein interfaceValueVector.Mutator- Overrides:
exchangein classBaseValueVector.BaseMutator
-
fromNotNullable
-