Package org.apache.drill.exec.vector
Class BaseValueVector
java.lang.Object
org.apache.drill.exec.vector.BaseValueVector
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<ValueVector>,ValueVector
- Direct Known Subclasses:
BaseDataValueVector,BaseRepeatedValueVector,ObjectVector
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface org.apache.drill.exec.vector.ValueVector
ValueVector.Accessor, ValueVector.Mutator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BufferAllocatorprotected final MaterializedFieldstatic final intstatic final intDeprecated.Fields inherited from interface org.apache.drill.exec.vector.ValueVector
BITS_VECTOR_NAME, MAX_BUFFER_SIZE, MAX_ROW_COUNT, MIN_ROW_COUNT, OFFSETS_VECTOR_NAME, VALUES_VECTOR_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseValueVector(MaterializedField field, BufferAllocator allocator) -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanvoidclear()Release the underlying DrillBuf and reset the ValueVector to empty.voidclose()Alternative to clear().static voidfillBitsVector(UInt1Vector bits, int valueCount) getField()Get information about how this field is materialized.Get the metadata for this field.protected UserBitShared.SerializedField.BuildergetTransferPair(BufferAllocator allocator) Returns atransfer pair, creating a new target vector of the same type.iterator()voidtoNullable(ValueVector nullableVector) Convert a non-nullable vector to nullable by shuffling the data from one to the other.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.apache.drill.exec.vector.ValueVector
allocateNew, allocateNewSafe, collectLedgers, copyEntry, exchange, getAccessor, getAllocatedSize, getBuffers, getBufferSize, getBufferSizeFor, getMutator, getPayloadByteCount, getReader, getTransferPair, getValueCapacity, load, makeTransferPair, setInitialCapacity
-
Field Details
-
MAX_ALLOCATION_SIZE
Deprecated.Physical maximum allocation. This is the value prior to Drill 1.11. This size causes memory fragmentation. Please useValueVector.MAX_BUFFER_SIZEin new code.- See Also:
-
INITIAL_VALUE_ALLOCATION
public static final int INITIAL_VALUE_ALLOCATION- See Also:
-
allocator
-
field
-
-
Constructor Details
-
BaseValueVector
-
-
Method Details
-
toString
-
clear
public void clear()Description copied from interface:ValueVectorRelease the underlying DrillBuf and reset the ValueVector to empty.- Specified by:
clearin interfaceValueVector
-
close
public void close()Description copied from interface:ValueVectorAlternative to clear(). Allows use as an AutoCloseable in try-with-resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceValueVector
-
getField
Description copied from interface:ValueVectorGet information about how this field is materialized.- Specified by:
getFieldin interfaceValueVector
-
getField
-
getTransferPair
Description copied from interface:ValueVectorReturns atransfer pair, creating a new target vector of the same type.- Specified by:
getTransferPairin interfaceValueVector
-
getMetadata
Description copied from interface:ValueVectorGet the metadata for this field. Used in serialization- Specified by:
getMetadatain interfaceValueVector- Returns:
- FieldMetadata for this field.
-
getMetadataBuilder
-
iterator
- Specified by:
iteratorin interfaceIterable<ValueVector>
-
checkBufRefs
-
getAllocator
- Specified by:
getAllocatorin interfaceValueVector
-
fillBitsVector
-
toNullable
Description copied from interface:ValueVectorConvert a non-nullable vector to nullable by shuffling the data from one to the other. Avoids the need to generate copy code just to change mode. If this vector is non-nullable, accepts a nullable dual (same minor type, different mode.) If the vector is non-nullable, or non-scalar, then throws an exception.- Specified by:
toNullablein interfaceValueVector- Parameters:
nullableVector- nullable vector of the same minor type as this vector
-