You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/23 18:13:37 UTC

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #37629: [SPARK-40160][PYTHON][DOCS] Make pyspark.broadcast examples self-contained

HyukjinKwon commented on code in PR #37629:
URL: https://github.com/apache/spark/pull/37629#discussion_r952967676


##########
python/pyspark/broadcast.py:
##########
@@ -149,6 +147,18 @@ def __init__(
                 self._path = path
 
     def dump(self, value: T, f: BinaryIO) -> None:
+        """
+        Write a pickled representation of value to the open file or socket.
+        The protocol pickle is HIGHEST_PROTOCOL.
+
+        Parameters
+        ----------
+        value : T
+            Value to write.
+
+        f : :class:`BinaryIO`
+            File or socket where the pickled value will be stored.
+        """

Review Comment:
   Could we maybe add an example with dump and load? E.g. with tempfile.TemporaryDirectory



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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