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 2019/02/27 04:41:22 UTC

[GitHub] HyukjinKwon opened a new pull request #23904: [SPARK-27000][PYTHON] Upgrades cloudpickle to v0.8.0

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:
users@infra.apache.org


With regards,
Apache Git Services

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