The following code
val df = List(1,2,3,4,5).toDF() df.foreachPartition(p => p.foreach(println(_)))
Works well in spark 2.4 with scala 2.11, but with Spark 3.0 with scala 2.12, it failed with this error:
error: value foreach is not a member of Object df.foreachPartition(p => p.foreach(println(_)))
2.1m questions
2.1m answers
60 comments
57.0k users