Hi,
Just ran into it and can't explain why it works. Please help me understand it.
Q1: Why can I `as[String]` with Ints? Is this type safe?
scala> (0 to 9).toDF("num").as[String]
res12: org.apache.spark.sql.Dataset[String] = [num: int]
Q2: Why can I map over strings even though there are really ints?
scala> (0 to 9).toDF("num").as[String].map(_.toUpperCase)
res11: org.apache.spark.sql.Dataset[String] = [value: string]
Why are the two lines possible?
Pozdrawiam,
Jacek Laskowski
----
https://medium.com/@jaceklaskowski/
Mastering Apache Spark 2.0 http://bit.ly/mastering-apache-spark
Follow me at https://twitter.com/jaceklaskowski
---------------------------------------------------------------------
To unsubscribe e-mail: [email protected]