diff --git a/arrow-data-source/standard/src/main/scala/com/intel/oap/spark/sql/execution/datasources/v2/arrow/ArrowUtils.scala b/arrow-data-source/standard/src/main/scala/com/intel/oap/spark/sql/execution/datasources/v2/arrow/ArrowUtils.scala index ad117e3ea..b42dd70be 100644 --- a/arrow-data-source/standard/src/main/scala/com/intel/oap/spark/sql/execution/datasources/v2/arrow/ArrowUtils.scala +++ b/arrow-data-source/standard/src/main/scala/com/intel/oap/spark/sql/execution/datasources/v2/arrow/ArrowUtils.scala @@ -117,6 +117,7 @@ object ArrowUtils { vectors.map(_.asInstanceOf[ColumnVector]) ++ partitionVectors .map { vector => + vector.setValueCount(rowCount) // The vector should call retain() whenever reuse it. vector.retain() vector.asInstanceOf[ColumnVector]