O'Reilly logo
  • Kai Zhang thinks this is interesting:

Map{(1, 2), (3, 4), (3, 6)}

From

Cover of Learning Spark

Note

Tested in spark 2.2, this will return Map(1 -> 2, 3 -> 6)
It's probably the map (3 -> 4) was overwritten by (3 -> 6), which means there will have only one single map for one key.