grundprinzip commented on code in PR #49503:
URL: https://github.com/apache/spark/pull/49503#discussion_r1916232428


##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/ml/MLUtils.scala:
##########
@@ -269,8 +293,9 @@ private[ml] object MLUtils {
    * @return
    *   the ML instance
    */
-  def load(className: String, path: String): Object = {
-    val loadedMethod = 
SparkClassUtils.classForName(className).getMethod("load", classOf[String])
+  def load(sessionHolder: SessionHolder, className: String, path: String): 
Object = {
+    val name = replaceOperator(sessionHolder, className)
+    val loadedMethod = SparkClassUtils.classForName(name).getMethod("load", 
classOf[String])

Review Comment:
   this is the only place where we don't use the service loader is there a way 
to change this? Maybe by trying first estimator and then transformer? Loading 
any class here is not an ideal situation.



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

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

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