-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[WIP][SPARK-28476][SQL] Support ALTER DATABASE SET LOCATION #25294
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
Changes from 2 commits
d2a68b3
71033f8
f3eb6e9
bd4fb39
7140624
d209d85
93d76d6
11255a5
0631959
c51f31c
734c302
efed7d0
2a95580
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 |
|---|---|---|
|
|
@@ -184,6 +184,15 @@ class DDLParserSuite extends AnalysisTest with SharedSQLContext { | |
| containsThesePhrases = Seq("key_without_value")) | ||
| } | ||
|
|
||
| test("alter database set location") { | ||
| // ALTER (DATABASE|SCHEMA) database_name SET LOCATION | ||
| val sql1 = "ALTER DATABASE database_name SET LOCATION '/home/user/db'" | ||
|
Member
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. This is the parser test case. Add both negative and positive end to end test cases?
Member
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. Add it to DDLSuite?
Contributor
Author
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. I add a positive e2e test case.
Member
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.
|
||
| val parsed1 = parser.parsePlan(sql1) | ||
|
|
||
| val expected1 = AlterDatabaseLocationCommand("database_name", "/home/user/db") | ||
| comparePlans(parsed1, expected1) | ||
| } | ||
|
|
||
| test("describe database") { | ||
| // DESCRIBE DATABASE [EXTENDED] db_name; | ||
| val sql1 = "DESCRIBE DATABASE EXTENDED db_name" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.