2

When programing with Spark in Scala, I see two alternatives:

rdd.map(x => (x(5), 1))

and

rdd.map{x => (x(0), Set(x(1)))}

What is the difference between using () and {}?

Jeffrey Chung
  • 19,319
  • 8
  • 34
  • 54
CoMacNo
  • 41
  • 1
  • 6

0 Answers0