You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2023/04/03 23:03:23 UTC
[spark] branch master updated: [SPARK-43006][PYTHON][TESTS] Fix DataFrameTests.test_cache_dataframe
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 69301f7b8eb [SPARK-43006][PYTHON][TESTS] Fix DataFrameTests.test_cache_dataframe
69301f7b8eb is described below
commit 69301f7b8eb2be230dd2960d836e85bbdcfb93da
Author: Takuya UESHIN <ue...@databricks.com>
AuthorDate: Tue Apr 4 08:03:09 2023 +0900
[SPARK-43006][PYTHON][TESTS] Fix DataFrameTests.test_cache_dataframe
### What changes were proposed in this pull request?
This is a follow-up of #40619.
Fixes `DataFrameTests.test_cache_dataframe`.
### Why are the changes needed?
The storage level when `df.cache()` should be `StorageLevel.MEMORY_AND_DISK_DESER` in Python.
The test passed before #40619 because the difference is `deserialized`.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Fixed the test.
Closes #40650 from ueshin/issues/SPARK-43006/test_cache.
Authored-by: Takuya UESHIN <ue...@databricks.com>
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
python/pyspark/sql/tests/test_dataframe.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/pyspark/sql/tests/test_dataframe.py b/python/pyspark/sql/tests/test_dataframe.py
index 626c282bbb2..ac80762a4b0 100644
--- a/python/pyspark/sql/tests/test_dataframe.py
+++ b/python/pyspark/sql/tests/test_dataframe.py
@@ -1036,7 +1036,7 @@ class DataFrameTestsMixin:
self.assertEqual(df.storageLevel, StorageLevel.NONE)
df.cache()
- self.assertEqual(df.storageLevel, StorageLevel.MEMORY_AND_DISK)
+ self.assertEqual(df.storageLevel, StorageLevel.MEMORY_AND_DISK_DESER)
df.unpersist()
self.assertEqual(df.storageLevel, StorageLevel.NONE)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org