关注 spark技术分享,
撸spark源码 玩spark最佳实践

OnHeapColumnVector

OnHeapColumnVector

OnHeapColumnVector is a concrete WritableColumnVector that…​FIXME

OnHeapColumnVector is created when:

Allocating Column Vectors — allocateColumns Static Method

  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).

Note

allocateColumns is used when:

  • AggregateHashMap is created

  • InMemoryTableScanExec is requested to createAndDecompressColumn

  • VectorizedParquetRecordReader is requested to initBatch (with ON_HEAP memory mode)

  • OrcColumnarBatchReader is requested to initBatch (with ON_HEAP memory mode)

  • ColumnVectorUtils is requested to convert an iterator of rows into a single ColumnBatch (aka toBatch)

Creating OnHeapColumnVector Instance

OnHeapColumnVector takes the following when created:

  • Number of elements to hold in a vector (aka capacity)

  • Data type of the elements stored

When created, OnHeapColumnVector reserveInternal (for the given capacity) and reset.

reserveInternal Method

Note
reserveInternal is part of WritableColumnVector Contract to…​FIXME.

reserveInternal…​FIXME

reserveNewColumn Method

Note
reserveNewColumn is part of WritableColumnVector Contract to…​FIXME.

reserveNewColumn…​FIXME

赞(0) 打赏
未经允许不得转载:spark技术分享 » OnHeapColumnVector
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏