This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new d2f572428be5 [MINOR][DOCS] Correct the usage example of Dataset in Java d2f572428be5 is described below commit d2f572428be5346dfa412f6588e72686429ddc71 Author: aiden <dong...@haier.com> AuthorDate: Wed Jan 10 12:57:40 2024 +0900 [MINOR][DOCS] Correct the usage example of Dataset in Java ### What changes were proposed in this pull request? ### Why are the changes needed? ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? ### Was this patch authored or co-authored using generative AI tooling? Closes #44342 from Aiden-Dong/aiden-dev. Lead-authored-by: aiden <dong...@haier.com> Co-authored-by: Hyukjin Kwon <gurwls...@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> --- sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala b/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala index 31e1495db7e3..ff1bd8c73e6f 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala @@ -138,7 +138,8 @@ private[sql] object Dataset { * the following creates a new Dataset by applying a filter on the existing one: * {{{ * val names = people.map(_.name) // in Scala; names is a Dataset[String] - * Dataset<String> names = people.map((Person p) -> p.name, Encoders.STRING)); + * Dataset<String> names = people.map( + * (MapFunction<Person, String>) p -> p.name, Encoders.STRING()); // Java * }}} * * Dataset operations can also be untyped, through various domain-specific-language (DSL) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org