[ https://issues.apache.org/jira/browse/SPARK-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14321584#comment-14321584 ]
Yanbo Liang commented on SPARK-5821: ------------------------------------ This is because that INSERT OVERWRITE in external data sources will first delete the file /a/b/c/d and then save the generated RDD to /a/b/c/d/. However if we don't have write permission for directory /a/b/c, the delete will failure and /a/b/c/d still exists. After that, when call RDD.saveAsTextFile will throw exception. > [SQL] CTAS command failure when your don't have write permission of the > parent directory > ---------------------------------------------------------------------------------------- > > Key: SPARK-5821 > URL: https://issues.apache.org/jira/browse/SPARK-5821 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 1.3.0 > Reporter: Yanbo Liang > > When you run CTAS command such as > "CREATE TEMPORARY TABLE jsonTable > USING org.apache.spark.sql.json.DefaultSource > OPTIONS ( > path /a/b/c/d > ) AS > SELECT a, b FROM jt", > you will run into failure if you don't have write permission for directory > /a/b/c whether d is a directory or file. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org