Example
- With java, you need to give the object encoder
Dataset<String> names = people.map((Person p) -> p.name, Encoders.STRING));
- Scala do the cast implicitly.
val names = people.map(_.name) // in Scala; names is a Dataset[String]
Dataset<String> names = people.map((Person p) -> p.name, Encoders.STRING));
val names = people.map(_.name) // in Scala; names is a Dataset[String]