You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xusen Yin (JIRA)" <ji...@apache.org> on 2016/07/04 22:54:11 UTC
[jira] [Commented] (SPARK-16372) RowMatrix constructor should use
retag for Java compatibility
[ https://issues.apache.org/jira/browse/SPARK-16372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15361822#comment-15361822 ]
Xusen Yin commented on SPARK-16372:
-----------------------------------
SPARK-11497 fixed this for PySpark.
> RowMatrix constructor should use retag for Java compatibility
> -------------------------------------------------------------
>
> Key: SPARK-16372
> URL: https://issues.apache.org/jira/browse/SPARK-16372
> Project: Spark
> Issue Type: Bug
> Components: MLlib
> Reporter: Xusen Yin
> Priority: Minor
>
> The following Java code because of type erasing:
> {code}
> JavaRDD<Vector> rows = jsc.parallelize(...);
> RowMatrix mat = new RowMatrix(rows.rdd());
> QRDecomposition<RowMatrix, Matrix> result = mat.tallSkinnyQR(true);
> {code}
> We should use retag to restore the type to prevent the following exception:
> {code}
> java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache.spark.mllib.linalg.Vector;
> {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