Skip to content

Commit 5db6a3c

Browse files
committed
need copy for internal row when coalesce to one partition
1 parent 90217c0 commit 5db6a3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/BroadcastExchangeExec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ case class BroadcastExchangeExec(
8181
val broadcasted = if (executorBroadcast) {
8282
val before = System.nanoTime()
8383
val res = child.execute().coalesce(1).mapPartitions { iter =>
84-
Seq(mode.transform(iter.toArray)).iterator
84+
Seq(mode.transform(iter.map(_.copy()).toArray)).iterator
8585
}.broadcast()
8686
longMetric("collect_build_broadcastTime") += (System.nanoTime() - before) / 1000000
8787
res

0 commit comments

Comments
 (0)