-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-14362][SPARK-14406][SQL][Follow-up] DDL Native Support: Drop View and Drop Table #12284
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
| // When ifExists is false, no exception is issued when the table does not exist. | ||
| // Instead, log it as an error message. | ||
| val objectName = if (isView) "View" else "Table" | ||
| logError(s"$objectName '${tableName.quotedString}' does not exist") |
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.
Why we need to check tableExists at the beginning?
Here, the reason is to avoid issuing a confusing message. Without the change, users might get a confusing error message table 'abc' does not exist, although they issue a command DROP VIEW.
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.
Should we just let SessionCatalog to log something like Table or View ${name.quotedString} does not exist?
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, we might need to change a couple of messages for it. Let me try it. Thanks!
|
Test build #55470 has finished for PR 12284 at commit
|
|
cc @yhuai @andrewor14 Thanks! |
|
Test build #55489 has finished for PR 12284 at commit
|
|
Test build #55495 has finished for PR 12284 at commit
|
|
Thanks. Merging to master. |
What changes were proposed in this pull request?
This PR is to address the comment: #12146 (diff). It removes the function
isViewSupportedfromSessionCatalog. After the removal, we still can capture the user errors if users try to drop a table usingDROP VIEW.How was this patch tested?
Modified the existing test cases