Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/22523#discussion_r219686544 --- Diff: python/pyspark/context.py --- @@ -537,8 +537,10 @@ def _serialize_to_jvm(self, data, serializer, reader_func, createRDDServer): # parallelize from there. tempFile = NamedTemporaryFile(delete=False, dir=self._temp_dir) --- End diff -- Actually, we better use a context manager: ```python with NamedTemporaryFile(delete=False, dir=self._temp_dir) as tempfile: ... ``` but not a big deal. LGTM
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org