Spark rzadki wektor do listy

list(vector.toArray().tolist())
Index out of bounds