Repository: spark Updated Branches: refs/heads/branch-2.0 12a2e2a5a -> 949544d01
[SPARK-17347][SQL][EXAMPLES] Encoder in Dataset example has incorrect type ## What changes were proposed in this pull request? We propose to fix the Encoder type in the Dataset example ## How was this patch tested? The PR will be tested with the current unit test cases Author: CodingCat <zhunans...@gmail.com> Closes #14901 from CodingCat/SPARK-17347. (cherry picked from commit 97da41039b2b8fa7f93caf213ae45b9973925995) Signed-off-by: Sean Owen <so...@cloudera.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/949544d0 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/949544d0 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/949544d0 Branch: refs/heads/branch-2.0 Commit: 949544d017ab25b43b683cd5c1e6783d87bfce45 Parents: 12a2e2a Author: CodingCat <zhunans...@gmail.com> Authored: Sat Sep 3 10:03:40 2016 +0100 Committer: Sean Owen <so...@cloudera.com> Committed: Sat Sep 3 10:03:48 2016 +0100 ---------------------------------------------------------------------- .../main/scala/org/apache/spark/examples/sql/SparkSQLExample.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/949544d0/examples/src/main/scala/org/apache/spark/examples/sql/SparkSQLExample.scala ---------------------------------------------------------------------- diff --git a/examples/src/main/scala/org/apache/spark/examples/sql/SparkSQLExample.scala b/examples/src/main/scala/org/apache/spark/examples/sql/SparkSQLExample.scala index 5cd437d..129b81d 100644 --- a/examples/src/main/scala/org/apache/spark/examples/sql/SparkSQLExample.scala +++ b/examples/src/main/scala/org/apache/spark/examples/sql/SparkSQLExample.scala @@ -203,7 +203,7 @@ object SparkSQLExample { // No pre-defined encoders for Dataset[Map[K,V]], define explicitly implicit val mapEncoder = org.apache.spark.sql.Encoders.kryo[Map[String, Any]] // Primitive types and case classes can be also defined as - implicit val stringIntMapEncoder: Encoder[Map[String, Int]] = ExpressionEncoder() + // implicit val stringIntMapEncoder: Encoder[Map[String, Any]] = ExpressionEncoder() // row.getValuesMap[T] retrieves multiple columns at once into a Map[String, T] teenagersDF.map(teenager => teenager.getValuesMap[Any](List("name", "age"))).collect() --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org