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
Modifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from interface org.apache.drill.exec.vector.ValueVector
ValueVector.Accessor, ValueVector.Mutator
-
Field Summary
Modifier and TypeFieldDescriptionprotected final BufferAllocator
protected final MaterializedField
static final int
static final int
Deprecated.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
ModifierConstructorDescriptionprotected
BaseValueVector
(MaterializedField field, BufferAllocator allocator) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
void
clear()
Release the underlying DrillBuf and reset the ValueVector to empty.void
close()
Alternative to clear().static void
fillBitsVector
(UInt1Vector bits, int valueCount) getField()
Get information about how this field is materialized.Get the metadata for this field.protected UserBitShared.SerializedField.Builder
getTransferPair
(BufferAllocator allocator) Returns atransfer pair
, creating a new target vector of the same type.iterator()
void
toNullable
(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, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods 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_SIZE
in 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:ValueVector
Release the underlying DrillBuf and reset the ValueVector to empty.- Specified by:
clear
in interfaceValueVector
-
close
public void close()Description copied from interface:ValueVector
Alternative to clear(). Allows use as an AutoCloseable in try-with-resources.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceValueVector
-
getField
Description copied from interface:ValueVector
Get information about how this field is materialized.- Specified by:
getField
in interfaceValueVector
-
getField
-
getTransferPair
Description copied from interface:ValueVector
Returns atransfer pair
, creating a new target vector of the same type.- Specified by:
getTransferPair
in interfaceValueVector
-
getMetadata
Description copied from interface:ValueVector
Get the metadata for this field. Used in serialization- Specified by:
getMetadata
in interfaceValueVector
- Returns:
- FieldMetadata for this field.
-
getMetadataBuilder
-
iterator
- Specified by:
iterator
in interfaceIterable<ValueVector>
-
checkBufRefs
-
getAllocator
- Specified by:
getAllocator
in interfaceValueVector
-
fillBitsVector
-
toNullable
Description copied from interface:ValueVector
Convert 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:
toNullable
in interfaceValueVector
- Parameters:
nullableVector
- nullable vector of the same minor type as this vector
-