Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
fix columnar wscg on empty recordbatch (#36)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
  • Loading branch information
zhouyuan authored Jan 14, 2021
1 parent 4ee0d1b commit 8f01e2e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ case class ColumnarWholeStageCodegenExec(child: SparkPlan)(val codegenStageId: I
var build_elapse_internal: Long = 0
while (depIter.hasNext) {
val dep_cb = depIter.next()
if (dep_cb.numRows > 0) {
(0 until dep_cb.numCols).toList.foreach(i =>
dep_cb.column(i).asInstanceOf[ArrowWritableColumnVector].retain())
buildRelationBatchHolder += dep_cb
Expand All @@ -353,6 +354,7 @@ case class ColumnarWholeStageCodegenExec(child: SparkPlan)(val codegenStageId: I
ConverterUtils.releaseArrowRecordBatch(dep_rb)
build_elapse += System.nanoTime() - beforeEval
build_elapse_internal += System.nanoTime() - beforeEval
}
}
buildTime += (build_elapse_internal / 1000000)
dependentKernels += hashRelationKernel
Expand Down

0 comments on commit 8f01e2e

Please sign in to comment.