Github user koertkuipers commented on a diff in the pull request: https://github.com/apache/spark/pull/2963#discussion_r21387829 --- Diff: core/src/main/scala/org/apache/spark/rdd/PairRDDFunctions.scala --- @@ -460,6 +461,63 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)]) } /** + * Group the values for each key in the RDD and apply a binary operator to a start value and all + * ordered values for a key, going left to right. + * + * Note: this operation may be expensive, since there is no map-side combine, so all values are + * send through the shuffle. + */ + def foldLeftByKey[U: ClassTag](valueOrdering: Ordering[V], zeroValue: U, --- End diff -- Does this make it harder for the user to provide an ordering other than the natural ordering?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org