We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16e79e3 commit 02d107aCopy full SHA for 02d107a
core/src/main/scala/org/apache/spark/rdd/RDD.scala
@@ -1089,9 +1089,8 @@ abstract class RDD[T: ClassTag](
1089
(i, iter) => iter.map((i % curNumPartitions, _))
1090
}.foldByKey(zeroValue, new HashPartitioner(curNumPartitions))(cleanCombOp).values
1091
}
1092
- //partiallyAggregated.reduce(cleanCombOp)
1093
- // This fails:
1094
- partiallyAggregated.fold(zeroValue)(cleanCombOp)
+ val copiedZeroValue = Utils.clone(zeroValue, sc.env.closureSerializer.newInstance())
+ partiallyAggregated.fold(copiedZeroValue)(cleanCombOp)
1095
1096
1097
0 commit comments