OnHeapColumnVector¶
OnHeapColumnVector
is a concrete WritableColumnVector.
OnHeapColumnVector
is <
-
OnHeapColumnVector
is requested to <> and < > -
OrcColumnarBatchReader
is requested toinitBatch
=== [[allocateColumns]] Allocating Column Vectors -- allocateColumns
Static Method
[source, java]¶
OnHeapColumnVector[] allocateColumns(int capacity, StructType schema) // <1> OnHeapColumnVector[] allocateColumns(int capacity, StructField[] fields)
<1> Simply converts StructType
to StructField[]
and calls the other allocateColumns
allocateColumns
creates an array of OnHeapColumnVector
for every field (to hold capacity
number of elements of the data type per field).
allocateColumns
is used when:
-
AggregateHashMap
is created -
InMemoryTableScanExec
is requested to InMemoryTableScanExec.md#createAndDecompressColumn[createAndDecompressColumn] -
VectorizedParquetRecordReader
is requested to initBatch (withON_HEAP
memory mode) -
OrcColumnarBatchReader
is requested toinitBatch
(withON_HEAP
memory mode) -
ColumnVectorUtils
is requested to convert an iterator of rows into a singleColumnBatch
(akatoBatch
)
Creating Instance¶
OnHeapColumnVector
takes the following when created:
- [[capacity]] Number of elements to hold in a vector (aka
capacity
) - [[type]] Data type of the elements stored
When created, OnHeapColumnVector
<
=== [[reserveInternal]] reserveInternal
Method
[source, java]¶
void reserveInternal(int newCapacity)¶
reserveInternal
is part of the WritableColumnVector abstraction.
reserveInternal
...FIXME
=== [[reserveNewColumn]] reserveNewColumn
Method
[source, java]¶
OnHeapColumnVector reserveNewColumn( int capacity, DataType type)
reserveNewColumn
is part of the WritableColumnVector abstraction.
reserveNewColumn
...FIXME