[ https://issues.apache.org/jira/browse/SYSTEMML-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15850636#comment-15850636 ]
Deron Eriksson commented on SYSTEMML-1222: ------------------------------------------ Since Long is not a recognized SystemML value type, it makes sense to do the long to int conversion high up in the API. Value types in SystemML (from Statement.java): {code} public static final String DOUBLE_VALUE_TYPE = "double"; public static final String BOOLEAN_VALUE_TYPE = "boolean"; public static final String INT_VALUE_TYPE = "int"; public static final String STRING_VALUE_TYPE = "string"; {code} Thank for finding this [~mwdus...@us.ibm.com]. https://github.com/apache/incubator-systemml/pull/370 addresses this. > MLContext `read` Statement Value Input Error For `cols_in_block` Argument > ------------------------------------------------------------------------- > > Key: SYSTEMML-1222 > URL: https://issues.apache.org/jira/browse/SYSTEMML-1222 > Project: SystemML > Issue Type: Bug > Reporter: Mike Dusenberry > Assignee: Deron Eriksson > Priority: Minor > > The {{read}} statement has optional numeric parameters, such as > {{cols_in_block}} that expect integers. If a Scala {{Long}} is supplied as > an input variable for one of those parameters via MLContext, and type error > will occur in which an {{Int}} was expected, but a {{Long}} was received. A > quick fix is to convert to an integer with {{Long.toInt}} before passing the > value into the script via MLContext. > We should automatically cast {{Long}} to {{Int}} internally. -- This message was sent by Atlassian JIRA (v6.3.15#6346)