This is an automated email from the ASF dual-hosted git repository.
wenchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 80d6651cf6a1 [SPARK-48195][FOLLOWUP] Accumulator reset() no longer
needed in CollectMetricsExec.doExecute()
80d6651cf6a1 is described below
commit 80d6651cf6a1835d0de3e12e08253d2a9816d499
Author: Julek Sompolski <Juliusz Sompolski>
AuthorDate: Wed Sep 25 23:34:23 2024 +0800
[SPARK-48195][FOLLOWUP] Accumulator reset() no longer needed in
CollectMetricsExec.doExecute()
### What changes were proposed in this pull request?
Small followup to https://github.com/apache/spark/pull/48037.
`collector.reset()` is no longer needed in `CollectMetricsExec.doExecute()`
because it is reset in `resetMetrics()`. This doesn't really matter in
practice, but removing to clean up.
### Why are the changes needed?
Tiny cleanup.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
This change doesn't matter in practice. Just cleanup.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #48243 from juliuszsompolski/SPARK-48195-followup.
Authored-by: Julek Sompolski <Juliusz Sompolski>
Signed-off-by: Wenchen Fan <[email protected]>
---
.../main/scala/org/apache/spark/sql/execution/CollectMetricsExec.scala | 1 -
1 file changed, 1 deletion(-)
diff --git
a/sql/core/src/main/scala/org/apache/spark/sql/execution/CollectMetricsExec.scala
b/sql/core/src/main/scala/org/apache/spark/sql/execution/CollectMetricsExec.scala
index 2115e21f81d7..0a487bac7769 100644
---
a/sql/core/src/main/scala/org/apache/spark/sql/execution/CollectMetricsExec.scala
+++
b/sql/core/src/main/scala/org/apache/spark/sql/execution/CollectMetricsExec.scala
@@ -67,7 +67,6 @@ case class CollectMetricsExec(
override protected def doExecute(): RDD[InternalRow] = {
val collector = accumulator
- collector.reset()
child.execute().mapPartitions { rows =>
// Only publish the value of the accumulator when the task has
completed. This is done by
// updating a task local accumulator ('updater') which will be merged
with the actual
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]