Normally in Scala if you invoke toDS()
on a sequence, you get:
error: value toDS is not a member of Seq[Int]
However, in a SparkSession, you can invoke the same method on a Seq and it creates a DataSet.
How is this MetaProgramming actually happening?