This is to be consistent with RDD.glom() and RDD.collect(), where Array[T] is used. In Scala Array.sliding returns Iterator[Array[T]]. I can change it to Seq to be more general. Please see the updated PR.