-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-14125] [SQL] Native DDL Support: Alter View #12324
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
|
Test build #55595 has finished for PR 12324 at commit
|
| catalog.renameTable(oldName, newName) | ||
| Seq.empty[Row] | ||
| } | ||
|
|
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.
nit: I left this line intentionally!
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.
Ok, I see.
|
Looks great! Only minor comments. |
# Conflicts: # sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala
|
Test build #55782 has finished for PR 12324 at commit
|
| assert(!catalog.tableExists(TableIdentifier(oldViewName))) | ||
| assert(catalog.tableExists(TableIdentifier(newViewName))) | ||
|
|
||
| sql(s"DROP VIEW $newViewName") |
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.
withView will help us drop the view at last.
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.
Sure, remove it now. Thanks!
|
LGTM except some minor comments |
|
Test build #55815 has finished for PR 12324 at commit
|
|
Thanks. Merging to master. |
What changes were proposed in this pull request?
This PR is to provide a native DDL support for the following three Alter View commands:
Based on the Hive DDL document:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL
1. ALTER VIEW RENAME
Syntax:
2. ALTER VIEW SET TBLPROPERTIES
Syntax:
3. ALTER VIEW UNSET TBLPROPERTIES
Syntax:
How was this patch tested?
Added test cases to verify if it works properly.