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

    https://github.com/apache/spark/pull/14242#discussion_r71109485
  
    --- Diff: 
examples/src/main/scala/org/apache/spark/examples/SparkKMeans.scala ---
    @@ -75,7 +74,10 @@ object SparkKMeans {
         val data = lines.map(parseVector _).cache()
         val K = args(1).toInt
         val convergeDist = args(2).toDouble
    -
    +    /*
    +     * A requirement of using takeSample() method: the element in data 
(line 74) should be unique (No duplicates), otherwise the size of newPoints 
(line 89) will not 
    --- End diff --
    
    This sounds like a comment for a caller, but it's not visible to anyone but 
those reading source code. 
    
    Why not just call `.distinct` in the code to avoid the problem entirely?


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