Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-19724

create a managed table with an existed default location should throw an exception

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.4.0
    • SQL

    Description

      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

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Gengliang.Wang Gengliang Wang
            windpiger Song Jun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment