I am trying to use mapPartitions function instead of using map, the problem is that I want to pass an Array as an argument, but mapPartitions does not take Array as an argument. How can I pass the array as argument?
mapPartitions[U: ClassTag](
f: Iterator[T] => Iterator[U], preservesPartitioning: Boolean = false)