[ 
https://issues.apache.org/jira/browse/SPARK-14767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15275480#comment-15275480
 ] 

Sandeep Singh edited comment on SPARK-14767 at 5/8/16 5:59 AM:
---------------------------------------------------------------

[~brkyvz] [~cloud_fan] Tried on current master, it works fine
!http://i.imgur.com/ZDQAn3n.png!


was (Author: techaddict):
[~brkyvz] [~cloud_fan] Tried on current master, it works fine
!http://imgur.com/ZDQAn3n!

> 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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to