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

CTAS for data source tables with an created location does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.2.0
    • SQL
    • None

    Description

              spark.sql(
                s"""
                   |CREATE TABLE t
                   |USING parquet
                   |PARTITIONED BY(a, b)
                   |LOCATION '$dir'
                   |AS SELECT 3 as a, 4 as b, 1 as c, 2 as d
                 """.stripMargin)
      

      Failed with the error message:

      path file:/private/var/folders/6r/15tqm8hn3ldb3rmbfqm1gf4c0000gn/T/spark-195cd513-428a-4df9-b196-87db0c73e772 already exists.;
      org.apache.spark.sql.AnalysisException: path file:/private/var/folders/6r/15tqm8hn3ldb3rmbfqm1gf4c0000gn/T/spark-195cd513-428a-4df9-b196-87db0c73e772 already exists.;
      	at org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand.run(InsertIntoHadoopFsRelationCommand.scala:102)
      

      Attachments

        Activity

          People

            windpiger Song Jun
            smilegator Xiao Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: