以下为函数定义:
Scala:
aggregate[B](z: => B)(seqop: (B, A) => B, combop: (B, B) => B): B
Spark RDD:
aggregate[B](z: B)(seqop: (B, A) => B, combop: (B, B) => B): B
我知道Scala的聚合函数是为并行集合设计的,而Spark RDD的聚合函数是为分布式集合设计的。
但是,为什么Scala中的z参数是以惰性格式呈现的,而在Spark RDD中是以急切格式呈现的?