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

    https://github.com/apache/spark/pull/14219#discussion_r71077904
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/linalg/BLAS.scala ---
    @@ -617,8 +617,27 @@ private[spark] object BLAS extends Serializable with 
Logging {
           x: SparseVector,
           beta: Double,
           y: DenseVector): Unit = {
    -    val xValues = x.values
    -    val xIndices = x.indices
    +    
    +    def isSorted(l:Array[Int]): Boolean = {
    --- End diff --
    
    Many small style issues here. I think this is best as 
    
    ```
    private def isSorted(array: Array[Int]): Boolean = {
      var index = 1
      while (index < array.length) {
        if (array(index - 1) > array(index)) {
          return false
        }
        index += 1
      }
      true
    }
    ```


---
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