You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2016/09/03 09:03:43 UTC
spark git commit: [SPARK-17347][SQL][EXAMPLES] Encoder in Dataset
example has incorrect type
Repository: spark
Updated Branches:
refs/heads/master 7a8a81d79 -> 97da41039
[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 <zh...@gmail.com>
Closes #14901 from CodingCat/SPARK-17347.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/97da4103
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/97da4103
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/97da4103
Branch: refs/heads/master
Commit: 97da41039b2b8fa7f93caf213ae45b9973925995
Parents: 7a8a81d
Author: CodingCat <zh...@gmail.com>
Authored: Sat Sep 3 10:03:40 2016 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Sat Sep 3 10:03:40 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/97da4103/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-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org