amanomer commented on a change in pull request #26454: [SPARK-29818][MLLIB] 
Missing persist on RDD
URL: https://github.com/apache/spark/pull/26454#discussion_r345571669
 
 

 ##########
 File path: 
mllib/src/main/scala/org/apache/spark/mllib/feature/ChiSqSelector.scala
 ##########
 @@ -250,6 +250,7 @@ class ChiSqSelector @Since("2.1.0") () extends 
Serializable {
    */
   @Since("1.3.0")
   def fit(data: RDD[LabeledPoint]): ChiSqSelectorModel = {
+    data.persist()
 
 Review comment:
   Again, `data` is not some intermediate results, it is just user input. Hence 
removing persist from here.
   
https://github.com/apache/spark/blob/80fbc382a60973db21367a922a0fb797e5ab382d/mllib/src/main/scala/org/apache/spark/ml/feature/ChiSqSelector.scala#L214

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to