Package org.apache.drill.exec.record
Class VectorInitializer
java.lang.Object
org.apache.drill.exec.record.VectorInitializer
Prototype mechanism to allocate vectors based on expected
data sizes. This version uses a name-based map of fields
to sizes. Better to represent the batch structurally and
simply iterate over the schema rather than doing a per-field
lookup. But, the mechanisms needed to do the efficient solution
don't exist yet.
The element count is a float because it might be fractional. If every tenth array has an element, then the count per array is 0.1.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
allocateBatch
(VectorAccessible va, int recordCount) void
allocateVector
(ValueVector vector, int recordCount, VectorInitializer.AllocationHint hint) void
allocateVector
(ValueVector vector, String prefix, int recordCount) void
allocateVectors
(List<ValueVector> valueVectors, int recordCount) void
fixedWidthArray
(String name, float elements) toString()
void
variableWidth
(String name, int width) void
variableWidthArray
(String name, float width, float elements)
-
Constructor Details
-
VectorInitializer
public VectorInitializer()
-
-
Method Details
-
variableWidth
-
fixedWidthArray
-
variableWidthArray
-
hint
-
allocateBatch
-
allocateVectors
-
allocateVector
-
allocateVector
public void allocateVector(ValueVector vector, int recordCount, VectorInitializer.AllocationHint hint) -
toString
-