spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Owen (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (SPARK-14767) Codegen "no constructor found" errors with Maps inside case classes in Datasets
Date Wed, 14 Dec 2016 20:41:58 GMT

     [ https://issues.apache.org/jira/browse/SPARK-14767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sean Owen reopened SPARK-14767:
-------------------------------

> 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
>    Affects Versions: 2.0.0
>            Reporter: Burak Yavuz
>            Priority: Critical
>
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message