HyukjinKwon opened a new pull request #23904: [SPARK-27000][PYTHON] Upgrades 
cloudpickle to v0.8.0
URL: https://github.com/apache/spark/pull/23904
 
 
   ## What changes were proposed in this pull request?
   
   After upgrading cloudpickle to 0.6.1 at 
https://github.com/apache/spark/pull/20691, one regression was found. 
Cloudpickle had a critical https://github.com/cloudpipe/cloudpickle/pull/240 
for that.
   
   Basically, it currently looks existing globals would override globals 
shipped in a function's, meaning:
   
   **Before:**
   
   ```python
   >>> def hey():
   ...     return "Hi"
   ...
   >>> spark.range(1).rdd.map(lambda _: hey()).collect()
   ['Hi']
   >>> def hey():
   ...     return "Yeah"
   ...
   >>> spark.range(1).rdd.map(lambda _: hey()).collect()
   ['Hi']
   ```
   
   **After:**
   
   ```python
   >>> def hey():
   ...     return "Hi"
   ...
   >>> spark.range(1).rdd.map(lambda _: hey()).collect()
   ['Hi']
   >>>
   >>> def hey():
   ...     return "Yeah"
   ...
   >>> spark.range(1).rdd.map(lambda _: hey()).collect()
   ['Yeah']
   ```
   
   ## How was this patch tested?
   
   Manually tested, tests were added. Verified unit tests were added in 
cloudpickle.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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