diff options
author | Yadong Qi <qiyadong2010@gmail.com> | 2014-08-28 14:08:48 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-08-28 14:08:48 -0700 |
commit | 39012452daa0746fe5d218493b85f9b5f96190c1 (patch) | |
tree | 66794dbf4b13bbea3427abae79c09afa7a137a3e /graphx/src/main/scala/org/apache | |
parent | be53c54b5c685e1d04d49bd554e05029a5a106e1 (diff) | |
download | spark-39012452daa0746fe5d218493b85f9b5f96190c1.tar.gz spark-39012452daa0746fe5d218493b85f9b5f96190c1.tar.bz2 spark-39012452daa0746fe5d218493b85f9b5f96190c1.zip |
[SPARK-3285] [examples] Using values.sum is easier to understand than using values.foldLeft(0)(_ + _)
def sum[B >: A](implicit num: Numeric[B]): B = foldLeft(num.zero)(num.plus)
Using values.sum is easier to understand than using values.foldLeft(0)(_ + _), so we'd better use values.sum instead of values.foldLeft(0)(_ + _)
Author: Yadong Qi <qiyadong2010@gmail.com>
Closes #2182 from watermen/bug-fix3 and squashes the following commits:
17be9fb [Yadong Qi] Update CheckpointSuite.scala
714bda5 [Yadong Qi] Update BasicOperationsSuite.scala
57e704c [Yadong Qi] Update StatefulNetworkWordCount.scala
Diffstat (limited to 'graphx/src/main/scala/org/apache')
0 files changed, 0 insertions, 0 deletions