Github user yinxusen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14051#discussion_r69656311
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala 
---
    @@ -537,7 +537,7 @@ class RowMatrix @Since("1.0.0") (
       def tallSkinnyQR(computeQ: Boolean = false): QRDecomposition[RowMatrix, 
Matrix] = {
         val col = numCols().toInt
         // split rows horizontally into smaller matrices, and compute QR for 
each of them
    -    val blockQRs = rows.glom().map { partRows =>
    +    val blockQRs = rows.retag(classOf[Vector]).glom().map { partRows =>
    --- End diff --
    
    I also tried other interfaces of RowMatrix, all work good:
    
    ```Java
    JavaRDD<Vector> rows = jsc.parallelize(Arrays.asList(v1, v2, v3), 1);
    Matrix dm = Matrices.dense(3, 2, new double[] {1.0, 3.0, 5.0, 2.0, 4.0, 
6.0});
    RowMatrix mat = new RowMatrix(rows.rdd());
    
    mat.computeGramianMatrix();
    mat.columnSimilarities();
    mat.columnSimilarities(0.5);
    mat.computeColumnSummaryStatistics();
    mat.computeCovariance();
    mat.computePrincipalComponents(1);
    mat.computeSVD(1, false, 1e-9);
    mat.toBreeze();
    mat.rows();
    mat.numCols();
    mat.numRows();
    mat.multiply(dm);
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to