GitHub user windpiger opened a pull request: https://github.com/apache/spark/pull/17272
[SPARK-19724][SQL]create a managed table with an existed default table should throw an exception ## What changes were proposed in this pull request? This JIRA is a follow up work after [SPARK-19583](https://issues.apache.org/jira/browse/SPARK-19583) As we discussed in that [PR](https://github.com/apache/spark/pull/16938) The following DDL for a managed table with an existed default location should throw an exception: ``` CREATE TABLE ... (PARTITIONED BY ...) AS SELECT ... CREATE TABLE ... (PARTITIONED BY ...) ``` Currently there are some situations which are not consist with above logic: 1. CREATE TABLE ... (PARTITIONED BY ...) succeed with an existed default location situation: for both hive/datasource(with HiveExternalCatalog/InMemoryCatalog) 2. 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 You can merge this pull request into a Git repository by running: $ git pull https://github.com/windpiger/spark managedTableLocationExists Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/17272.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #17272 ---- commit a0ba4190a96e2698e9c485b0ccbb7298a360f1dd Author: windpiger <song...@outlook.com> Date: 2017-03-13T07:24:18Z [SPARK-19724][SQL]create a managed table with an existed default table path should throw an exception ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org