srowen commented on a change in pull request #23954: [SPARK-27041][PySpark] Use 
imap() for python 2.x to resolve oom issue
URL: https://github.com/apache/spark/pull/23954#discussion_r262055248
 
 

 ##########
 File path: python/pyspark/worker.py
 ##########
 @@ -45,6 +45,8 @@
 
 if sys.version >= '3':
     basestring = str
+else:
+    from itertools import imap as map  # use iterator map by default
 
 Review comment:
   It deserves a comment, at least. I think this is a relatively safe change as 
this is already how Python 3 works.
   I can only find one usage in this file, which is the part that applies a UDF 
to data. That's the source of the issue? just checking. Surprisingly that seems 
to be the only call in non-test code where it seems to matter.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to