zero323 commented on a change in pull request #34671:
URL: https://github.com/apache/spark/pull/34671#discussion_r754551374
##########
File path: python/pyspark/ml/common.py
##########
@@ -53,24 +57,24 @@ def _new_smart_decode(obj):
# this will call the ML version of pythonToJava()
-def _to_java_object_rdd(rdd):
+def _to_java_object_rdd(rdd: RDD) -> JavaObject:
"""Return an JavaRDD of Object by unpickling
It will convert each Python object into Java object by Pickle, whenever the
RDD is serialized in batch or not.
"""
- rdd = rdd._reserialize(AutoBatchedSerializer(PickleSerializer()))
- return
rdd.ctx._jvm.org.apache.spark.ml.python.MLSerDe.pythonToJava(rdd._jrdd, True)
+ rdd = rdd._reserialize(AutoBatchedSerializer(PickleSerializer())) # type:
ignore[attr-defined]
+ return
rdd.ctx._jvm.org.apache.spark.ml.python.MLSerDe.pythonToJava(rdd._jrdd, True)
# type: ignore[attr-defined]
Review comment:
At the moment, both `SparkContext` and `RDD` don't have inline
annotations and stubs, intentionally, cover only public API.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]