Skip to content

Commit 47d3327

Browse files
committed
Copy tuples in Limit before shuffle.
1 parent 231af3a commit 47d3327

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/basicOperators.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ case class Limit(limit: Int, child: SparkPlan)(@transient sc: SparkContext) exte
7676

7777
override def execute() = {
7878
child.execute()
79-
.mapPartitions(_.take(limit))
79+
.mapPartitions(_.take(limit).map(_.copy()))
8080
.coalesce(1, shuffle = true)
8181
.mapPartitions(_.take(limit))
8282
}

0 commit comments

Comments
 (0)