-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-19724][SQL][WIP]create a managed table with an existed default location should throw an exception #17057
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
… location should throw an exception
| test("CTAS for managed data source table with a created default location throw an exception") { | ||
| withTable("t", "t1", "t2") { | ||
| val warehousePath = spark.sharedState.warehousePath.stripPrefix("file:") | ||
| val tFile = new File(warehousePath, "t") |
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.
there are lots of non-existent default location test cases, so here we just add existed default location test cases
|
Test build #73421 has finished for PR 17057 at commit
|
|
Test build #73420 has finished for PR 17057 at commit
|
|
Test build #73426 has finished for PR 17057 at commit
|
|
Test build #73428 has finished for PR 17057 at commit
|
|
Test build #73429 has finished for PR 17057 at commit
|
What changes were proposed in this pull request?
This JIRA is a follow up work after SPARK-19583
As we discussed in that PR
The following DDL for a managed table with an existed default location should throw an exception:
Currently there are some situations which are not consist with above logic:
CREATE TABLE ... (PARTITIONED BY ...) succeed with an existed default location
situation: for both hive/datasource(with HiveExternalCatalog/InMemoryCatalog)
CREATE TABLE ... (PARTITIONED BY ...) AS SELECT ...
situation: hive table succeed with an existed default location
This PR is going to make above two situations consist with the logic that it should throw an exception
with an existed default location.
How was this patch tested?
unit test added