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

    https://github.com/apache/spark/pull/14049#discussion_r69602682
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala 
---
    @@ -538,20 +538,29 @@ class RowMatrix @Since("1.0.0") (
         val col = numCols().toInt
         // split rows horizontally into smaller matrices, and compute QR for 
each of them
         val blockQRs = rows.glom().map { partRows =>
    -      val bdm = BDM.zeros[Double](partRows.length, col)
    -      var i = 0
    -      partRows.foreach { row =>
    -        bdm(i, ::) := row.asBreeze.t
    -        i += 1
    +      if (partRows.length == 0) {
    --- End diff --
    
    Thanks! I changed it to filter then map.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to