keypointt commented on a change in pull request #28595:
URL: https://github.com/apache/spark/pull/28595#discussion_r430155232



##########
File path: 
mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala
##########
@@ -562,4 +562,20 @@ trait HasBlockSize extends Params {
   /** @group expertGetParam */
   final def getBlockSize: Int = $(blockSize)
 }
+
+/**
+ * Trait for shared param k. This trait may be changed or
+ * removed between minor versions.
+ */
+trait HasK extends Params {
+

Review comment:
       Add a simple test in 
https://github.com/apache/spark/blob/master/mllib/src/test/scala/org/apache/spark/ml/param/shared/SharedParamsSuite.scala
 ?
   
   like 
   ```
   class Obj(override val uid: String) extends Params with HasOutputCol with 
HasK {
   ...
   
   assert(obj.getOrDefault(obj.k) == 2)
   
   ```

##########
File path: 
mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala
##########
@@ -562,4 +562,20 @@ trait HasBlockSize extends Params {
   /** @group expertGetParam */
   final def getBlockSize: Int = $(blockSize)
 }
+
+/**
+ * Trait for shared param k. This trait may be changed or
+ * removed between minor versions.
+ */
+trait HasK extends Params {
+

Review comment:
       cool, I'm all good then. thanks :)




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



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

Reply via email to