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

    https://github.com/apache/spark/pull/13780#discussion_r73432445
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -376,24 +376,47 @@ def foreachPartition(self, f):
     
         @since(1.3)
         def cache(self):
    -        """ Persists with the default storage level (C{MEMORY_ONLY}).
    +        """Persists the :class:`DataFrame` with the default storage level 
(C{MEMORY_AND_DISK}).
    +
    +        .. note:: the default storage level has changed to 
C{MEMORY_AND_DISK} to match Scala in 2.0.
             """
             self.is_cached = True
             self._jdf.cache()
             return self
     
         @since(1.3)
    -    def persist(self, storageLevel=StorageLevel.MEMORY_ONLY):
    -        """Sets the storage level to persist its values across operations
    -        after the first time it is computed. This can only be used to 
assign
    -        a new storage level if the RDD does not have a storage level set 
yet.
    -        If no storage level is specified defaults to (C{MEMORY_ONLY}).
    +    def persist(self, storageLevel=StorageLevel.MEMORY_AND_DISK):
    --- End diff --
    
    One downside of that approach is the user can't easily explicitly cache 
in-memory only deserialized or even cache on two machines deserialized easily.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to