Burak Yavuz created SPARK-14767: ----------------------------------- Summary: Codegen "no constructor found" errors with Maps inside case classes in Datasets Key: SPARK-14767 URL: https://issues.apache.org/jira/browse/SPARK-14767 Project: Spark Issue Type: Bug Components: SQL Reporter: Burak Yavuz
When I have a `Map` inside a case class and am trying to use Datasets, the simplest operation throws an exception, because the generated code is looking for a constructor with `scala.collection.Map` whereas the constructor takes `scala.collection.immutable.Map`. To reproduce: {code} case class Bug(bug: Map[String, String]) val ds = Seq(Bug(Map("name" -> "dummy"))).toDS() ds.map { b => b.bug.getOrElse("name", null) }.count() {code} Stacktrace: {code} Caused by: java.util.concurrent.ExecutionException: java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 163, Column 150: No applicable constructor/method found for actual parameters "scala.collection.Map"; candidates are: Bug(scala.collection.immutable.Map)" {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org