Difference between passing elements from map in spark
-
-
What is the difference between below two ways?
val result = data.map { line => line.split(“\t”)(2) }
.countByValue()
———————————————————————————-
val result = data.map { line => line.split(“\t”)
line(2)
}.countByValue()
Both the outputs are not matching with one another.
- You must be logged in to reply to this topic.