You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Deron Eriksson (JIRA)" <ji...@apache.org> on 2016/08/29 18:39:20 UTC
[jira] [Created] (SYSTEMML-884) Remove Script in() method Scala Map
types
Deron Eriksson created SYSTEMML-884:
---------------------------------------
Summary: 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
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)