-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-21512][SQL][TEST] DatasetCacheSuite needs to execute unpersistent after executing peristent #18719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@gatorsmile could you please review this? |
|
Test build #79883 has finished for PR 18719 at commit
|
|
cc @cloud-fan |
|
shall we add a |
|
Good suggestion, make sense. done. |
gatorsmile
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Test build #79889 has finished for PR 18719 at commit
|
|
Thanks! Merging to master. |
|
|
||
| // Clear all persistent datasets after each test | ||
| override def afterEach(): Unit = { | ||
| spark.sharedState.cacheManager.clearCache() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try {
// Clear all persistent datasets after each test
spark.sharedState.cacheManager.clearCache()
} finally {
super.afterEach()
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, ideally we should always call super.afterEach, @kiszk can you send a follow-up PR? thx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I submitted #18721
|
good catch, i will create a follow-up PR today. |
…must call super.afterEach() ## What changes were proposed in this pull request? This PR ensures to call `super.afterEach()` in overriding `afterEach()` method in `DatasetCacheSuite`. When we override `afterEach()` method in Testsuite, we have to call `super.afterEach()`. This is a follow-up of apache#18719 and SPARK-21512. ## How was this patch tested? Used the existing test suite Author: Kazuaki Ishizaki <[email protected]> Closes apache#18721 from kiszk/SPARK-21516.
What changes were proposed in this pull request?
This PR avoids to reuse unpersistent dataset among test cases by making dataset unpersistent at the end of each test case.
In
DatasetCacheSuite, the test case"get storage level"does not make dataset unpersisit after make the dataset persisitent. The same dataset will be made persistent by the test case"persist and then rebind right encoder when join 2 datasets"Thus, we run these test cases, the second case does not perform to make dataset persistent. This is because inWhen we run only the second case, it performs to make dataset persistent. It is not good to change behavior of the second test suite. The first test case should correctly make dataset unpersistent.
After this PR, these messages do not appear
How was this patch tested?
Used the existing test