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

CTAS SQL with LOCATION properties won't check location path, cause data under this location lose

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.0
    • 3.2.0
    • SQL

    Description

      When we run SQL like 

      CRETE TABLE TBL 
      LOCATION 'PATH_URI'
      AS
      SELECT QUERY

      It won't check PATH_URI status, if there is some data under this path, it will just overwrite this path.

      If user careless write a path with important data store under the path, it will be a disaster。 

      Thought about add a checker in Catalyst for this situation.

      In addition, if it fails to delete the old path completely, old data and new data coexists.

      Attachments

        Activity

          People

            vinodkc Vinod KC
            angerszhuuu angerszhu
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: