SPARK-1259 from toLocallyIterable to toLocalIterator