zhengruifeng commented on code in PR #50199:
URL: https://github.com/apache/spark/pull/50199#discussion_r1992191679


##########
python/pyspark/ml/util.py:
##########
@@ -185,29 +185,40 @@ def wrapped(self: "JavaWrapper", dataset: 
"ConnectDataFrame") -> Any:
 
                 assert isinstance(self._java_obj, str)
                 params = serialize_ml_params(self, session.client)
-                return ConnectDataFrame(
-                    TransformerRelation(
-                        child=dataset._plan, name=self._java_obj, 
ml_params=params, is_model=True
-                    ),
-                    session,
+                plan = TransformerRelation(
+                    child=dataset._plan,
+                    name=self._java_obj,
+                    ml_params=params,
+                    is_model=True,
                 )
             elif isinstance(self, Transformer):
                 from pyspark.ml.connect.proto import TransformerRelation
 
                 assert isinstance(self._java_obj, str)
                 params = serialize_ml_params(self, session.client)
-                return ConnectDataFrame(
-                    TransformerRelation(
-                        child=dataset._plan,
-                        name=self._java_obj,
-                        ml_params=params,
-                        uid=self.uid,
-                        is_model=False,
-                    ),
-                    session,
+                plan = TransformerRelation(

Review Comment:
   ConnectDataFrame is to build the connect DF, it is still used at the end of 
this method



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