-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
[MINOR] [SQL] [TEST] Test case cleanups for recent PRs #20341
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -492,8 +492,7 @@ private[hive] class TestHiveSparkSession( | |
protected val originalUDFs: JavaSet[String] = FunctionRegistry.getFunctionNames | ||
|
||
/** | ||
* Resets the test instance by deleting any tables that have been created. | ||
* TODO: also clear out UDFs, views, etc. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These TODOs have been addressed. |
||
* Resets the test instance by deleting any table, view, temp view, and UDF that have been created | ||
*/ | ||
def reset() { | ||
try { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,8 +49,12 @@ class HiveUDAFSuite extends QueryTest with TestHiveSingleton with SQLTestUtils { | |
} | ||
|
||
protected override def afterAll(): Unit = { | ||
sql(s"DROP TEMPORARY FUNCTION IF EXISTS mock") | ||
sql(s"DROP TEMPORARY FUNCTION IF EXISTS hive_max") | ||
try { | ||
sql(s"DROP TEMPORARY FUNCTION IF EXISTS mock") | ||
sql(s"DROP TEMPORARY FUNCTION IF EXISTS hive_max") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, these drop functions are unnecessary. However, it sounds also fine to keep them because we should clean up the local objects after usage. |
||
} finally { | ||
super.afterAll() | ||
} | ||
} | ||
|
||
test("built-in Hive UDAF") { | ||
|
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.
cc @mgaido91