Description
The following Java code because of type erasing:
JavaRDD<Vector> rows = jsc.parallelize(...); RowMatrix mat = new RowMatrix(rows.rdd()); QRDecomposition<RowMatrix, Matrix> result = mat.tallSkinnyQR(true);
We should use retag to restore the type to prevent the following exception:
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache.spark.mllib.linalg.Vector;
Attachments
Issue Links
- blocks
-
SPARK-13015 Replace example code in mllib-data-types.md using include_example
- Resolved
- is related to
-
SPARK-11497 PySpark RowMatrix Constructor Has Type Erasure Issue
- Resolved
- links to