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

Deron Eriksson commented on SYSTEMML-884:
-----------------------------------------

Note: to build project, needed to have Map be <String, ?>. Build fixed by 
commit 
[b4d9dcdaa...|https://github.com/apache/incubator-systemml/commit/b4d9dcdaa4bddfd457085e3b17249e99172f4f14].

> Remove Script in() method Scala Map types
> -----------------------------------------
>
>                 Key: SYSTEMML-884
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-884
>             Project: SystemML
>          Issue Type: Bug
>          Components: APIs
>            Reporter: Deron Eriksson
>            Assignee: Deron Eriksson
>             Fix For: SystemML 0.11
>
>
> The following MLContext code from Spark Shell:
> {code}
> val addScript = dml("print(a + b)")
> addScript.in(Map("a"->1,"b"->2))
> {code}
> gives:
> {code}
> <console>:34: error: overloaded method value in with alternatives:
>   (x$1: Seq[Object])org.apache.sysml.api.mlcontext.Script <and>
>   (x$1: 
> scala.collection.Map[String,Object])org.apache.sysml.api.mlcontext.Script 
> <and>
>   (x$1: java.util.Map[String,Object])org.apache.sysml.api.mlcontext.Script
>  cannot be applied to (scala.collection.immutable.Map[String,Int])
>               addScript.in(Map("a"->1,"b"->2))
> {code}
> An annoying fix from Scala would be:
> {code}
> addScript.in(Map("a"->1.asInstanceOf[AnyRef],"b"->2.asInstanceOf[AnyRef]))
> {code}
> This is not good from a usability standpoint.
> An alternative that has good usability is to remove the <String, Object> 
> types from the scala.collection.Map of the in()/input() methods.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to