wbo4958 commented on code in PR #49503: URL: https://github.com/apache/spark/pull/49503#discussion_r1918051959
########## sql/connect/server/src/main/scala/org/apache/spark/sql/connect/ml/MLUtils.scala: ########## @@ -228,39 +225,66 @@ private[ml] object MLUtils { instance } + /** + * Replace the operator with the value provided by the backend. + */ + private def replaceOperator(sessionHolder: SessionHolder, name: String): String = { + SparkConnectPluginRegistry + .mlBackendRegistry(sessionHolder.session.sessionState.conf) + .view + .map(p => p.transform(name)) + .find(_.isPresent) // First come, first served + .getOrElse(Optional.of(name)) + .get() Review Comment: Really appreciate @gerashegalov for the knowledge. But I was following the existing pattern from https://github.com/apache/spark/blob/master/sql/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala#L1620, So I'd like to keep the original one. Probably, you can submit a PR to fix them both. -- 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