We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59f6edf commit 31a0cd7Copy full SHA for 31a0cd7
examples/src/main/scala/org/apache/spark/examples/sql/SparkSQLExample.scala
@@ -203,7 +203,7 @@ object SparkSQLExample {
203
// No pre-defined encoders for Dataset[Map[K,V]], define explicitly
204
implicit val mapEncoder = org.apache.spark.sql.Encoders.kryo[Map[String, Any]]
205
// Primitive types and case classes can be also defined as
206
- implicit val stringIntMapEncoder: Encoder[Map[String, Int]] = ExpressionEncoder()
+ implicit val stringIntMapEncoder: Encoder[Map[String, Any]] = ExpressionEncoder()
207
208
// row.getValuesMap[T] retrieves multiple columns at once into a Map[String, T]
209
teenagersDF.map(teenager => teenager.getValuesMap[Any](List("name", "age"))).collect()
0 commit comments