Skip to content

Commit

Permalink
getBarchFromMeta needs to add to the reference count
Browse files Browse the repository at this point in the history
  • Loading branch information
abellina committed Nov 13, 2020
1 parent a0182e6 commit d48a629
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ object MetaUtils extends Arm {
def getBatchFromMeta(deviceBuffer: DeviceMemoryBuffer,
meta: TableMeta,
sparkTypes: Array[DataType]): ColumnarBatch = {
withResource(new Array[GpuColumnVector](meta.columnMetasLength())) { columns =>
closeOnExcept(new ArrayBuffer[GpuColumnVector](meta.columnMetasLength())) { columns =>
val columnMeta = new ColumnMeta
(0 until meta.columnMetasLength).foreach { i =>
columns(i) = makeColumn(deviceBuffer, meta.columnMetas(columnMeta, i), sparkTypes(i))
columns.append(makeColumn(deviceBuffer, meta.columnMetas(columnMeta, i), sparkTypes(i)))
}
new ColumnarBatch(columns.toArray, meta.rowCount.toInt)
}
Expand Down

0 comments on commit d48a629

Please sign in to comment.