This is an automated email from the ASF dual-hosted git repository.
chengchengjin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new baed090dcd [GLUTEN-10087][VL] PartialProject avoid ColumnarBatch not
being released when exception occurs (#10088)
baed090dcd is described below
commit baed090dcdf4a51a151d03f52358142dc1c916fd
Author: Zhen Wang <[email protected]>
AuthorDate: Tue Jul 1 00:07:05 2025 +0800
[GLUTEN-10087][VL] PartialProject avoid ColumnarBatch not being released
when exception occurs (#10088)
---
.../execution/ColumnarPartialProjectExec.scala | 34 ++++++++++++----------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git
a/backends-velox/src/main/scala/org/apache/gluten/execution/ColumnarPartialProjectExec.scala
b/backends-velox/src/main/scala/org/apache/gluten/execution/ColumnarPartialProjectExec.scala
index 40541efd41..232c535fda 100644
---
a/backends-velox/src/main/scala/org/apache/gluten/execution/ColumnarPartialProjectExec.scala
+++
b/backends-velox/src/main/scala/org/apache/gluten/execution/ColumnarPartialProjectExec.scala
@@ -174,23 +174,25 @@ case class ColumnarPartialProjectExec(projectList:
Seq[NamedExpression], child:
val start = System.currentTimeMillis()
val childData = ColumnarBatches
.select(BackendsApiManager.getBackendName, batch,
projectIndexInChild.toArray)
- val projectedBatch = getProjectedBatchArrow(childData, c2a, a2c)
-
- val batchIterator = projectedBatch.map {
- b =>
- if (b.numCols() != 0) {
- val compositeBatch = VeloxColumnarBatches.compose(batch, b)
- b.close()
- compositeBatch
- } else {
- b.close()
- ColumnarBatches.retain(batch)
- batch
- }
+ try {
+ val projectedBatch = getProjectedBatchArrow(childData, c2a,
a2c)
+ val batchIterator = projectedBatch.map {
+ b =>
+ if (b.numCols() != 0) {
+ val compositeBatch = VeloxColumnarBatches.compose(batch,
b)
+ b.close()
+ compositeBatch
+ } else {
+ b.close()
+ ColumnarBatches.retain(batch)
+ batch
+ }
+ }
+ totalTime += System.currentTimeMillis() - start
+ batchIterator
+ } finally {
+ childData.close()
}
- childData.close()
- totalTime += System.currentTimeMillis() - start
- batchIterator
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]