[SPARK-14717] [PYTHON] Scala, Python APIs for Dataset.unpersist differ in default blocking value
## What changes were proposed in this pull request? Change unpersist blocking parameter default value to match Scala ## How was this patch tested? unit tests, manual tests jkbradley davies Author: felixcheung <felixcheung_m@hotmail.com> Closes #12507 from felixcheung/pyunpersist.
This commit is contained in:
parent
a685e65a4c
commit
3664142350
|
@ -326,9 +326,11 @@ class DataFrame(object):
|
|||
return self
|
||||
|
||||
@since(1.3)
|
||||
def unpersist(self, blocking=True):
|
||||
def unpersist(self, blocking=False):
|
||||
"""Marks the :class:`DataFrame` as non-persistent, and remove all blocks for it from
|
||||
memory and disk.
|
||||
|
||||
.. note:: `blocking` default has changed to False to match Scala in 2.0.
|
||||
"""
|
||||
self.is_cached = False
|
||||
self._jdf.unpersist(blocking)
|
||||
|
|
|
@ -362,7 +362,7 @@ class SQLTests(ReusedPySparkTestCase):
|
|||
# cache and checkpoint
|
||||
self.assertFalse(df.is_cached)
|
||||
df.persist()
|
||||
df.unpersist()
|
||||
df.unpersist(True)
|
||||
df.cache()
|
||||
self.assertTrue(df.is_cached)
|
||||
self.assertEqual(2, df.count())
|
||||
|
|
Loading…
Reference in a new issue