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

    https://github.com/apache/spark/pull/19685#discussion_r149554146
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/recommendation/ALS.scala 
---
    @@ -289,9 +289,11 @@ class ALSModel private[ml] (
     
       private val predict = udf { (featuresA: Seq[Float], featuresB: 
Seq[Float]) =>
         if (featuresA != null && featuresB != null) {
    -      // TODO(SPARK-19759): try dot-producting on Seqs or another 
non-converted type for
    -      // potential optimization.
    -      blas.sdot(rank, featuresA.toArray, 1, featuresB.toArray, 1)
    +      var dotProduct = 0.0f
    +      for(i <- 0 until rank) {
    --- End diff --
    
    You should `while` instead of `for`


---

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

Reply via email to