[ 
https://issues.apache.org/jira/browse/SPARK-19583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15865111#comment-15865111
 ] 

Song Jun commented on SPARK-19583:
----------------------------------

ok, I'd like to take this one, thanks a lot!

> CTAS for data source tables with an created location does not work
> ------------------------------------------------------------------
>
>                 Key: SPARK-19583
>                 URL: https://issues.apache.org/jira/browse/SPARK-19583
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: Xiao Li
>
> {noformat}
>         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)
> {noformat}
> Failed with the error message:
> {noformat}
> 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)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to