Description
val spark: SparkSession = ??? case class Test(id: String, map_test: Map[Long, String]) spark.sql("CREATE TABLE xyz.map_test (id string, map_test map<int, string>) STORED AS PARQUET") spark.sql("SELECT * FROM xyz.map_test").as[Test].map(t => t).collect()
org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 307, Column 108: No applicable constructor/method found for actual parameters "java.lang.String, scala.collection.Map"; candidates are: "$line14.$read$$iw$$iw$Test(java.lang.String, scala.collection.immutable.Map)"
Attachments
Issue Links
- is duplicated by
-
SPARK-14767 Codegen "no constructor found" errors with Maps inside case classes in Datasets
- Resolved
- links to