Github user holdenk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14579#discussion_r74305543
  
    --- Diff: python/pyspark/rdd.py ---
    @@ -221,6 +227,21 @@ def context(self):
         def cache(self):
             """
             Persist this RDD with the default storage level (C{MEMORY_ONLY}).
    +
    +        :py:meth:`cache` can be used in a 'with' statement. The RDD will 
be automatically
    +        unpersisted once the 'with' block is exited. Note however that any 
actions on the RDD
    +        that require the RDD to be cached, should be invoked inside the 
'with' block; otherwise,
    +        caching will have no effect.
    --- End diff --
    
    Super minor documentation suggestion - but I was thinking maybe a version 
changed directive could be helpful to call out that its new functionality (both 
in RDD and DF)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to