[ https://issues.apache.org/jira/browse/HIVE-17520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Dere resolved HIVE-17520. ------------------------------- Resolution: Duplicate Actually, similar solution already done in HIVE-15367 > Temp table with CTAS tries to create staging directory in the actual database > directory > --------------------------------------------------------------------------------------- > > Key: HIVE-17520 > URL: https://issues.apache.org/jira/browse/HIVE-17520 > Project: Hive > Issue Type: Bug > Components: Query Planning > Reporter: Jason Dere > Assignee: Jason Dere > > User does not have FS permissions on the database directory. > Note that normal CREATE TEMPORARY TABLE (no CTAS) on that database does work. > However trying temp table with CTAS fails with the following error: > {noformat} > hive> create temporary table jdere_temp as select * from > tpch_text_1000.nation; > FAILED: SemanticException 0:0 Error creating temporary folder on: > hdfs://cn105-10.l42scl.hortonworks.com:8020/apps/hive/warehouse/tpch_text_1000.db. > Error encountered near token 'TOK_TMP_FILE' > {noformat} > Simple fix would be to set the staging directory to the temp table location > for the case of temp tables. -- This message was sent by Atlassian JIRA (v6.4.14#64029)