Skip to content

Commit

Permalink
Copy tuples in Limit before shuffle.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxin committed Mar 26, 2014
1 parent 231af3a commit 47d3327
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ case class Limit(limit: Int, child: SparkPlan)(@transient sc: SparkContext) exte

override def execute() = {
child.execute()
.mapPartitions(_.take(limit))
.mapPartitions(_.take(limit).map(_.copy()))
.coalesce(1, shuffle = true)
.mapPartitions(_.take(limit))
}
Expand Down

0 comments on commit 47d3327

Please sign in to comment.