You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Grisha Trubetskoy (JIRA)" <ji...@apache.org> on 2015/07/31 20:27:04 UTC
[jira] [Created] (HIVE-11427) Location of temporary table for
CREATE TABLE SELECT broken by HIVE-7079
Grisha Trubetskoy created HIVE-11427:
----------------------------------------
Summary: Location of temporary table for CREATE TABLE SELECT broken by HIVE-7079
Key: HIVE-11427
URL: https://issues.apache.org/jira/browse/HIVE-11427
Project: Hive
Issue Type: Bug
Reporter: Grisha Trubetskoy
If a user _does not_ have HDFS write permissions to the _default_ database, and attempts to create a table in a _private_ database to which the user _does_ have permissions, the following happens:
{code}
create table grisha.blahblah as select * from some_table;
FAILED: SemanticException 0:0 Error creating temporary folder on: hdfs://nn.example.com/user/hive/warehouse. Error encountered near token 'TOK_TMP_FILE’
{code}
The reason for this seems to be https://github.com/apache/hive/commit/05a2aff71c2682e01331cd333189ce7802233a75#diff-f2040374293a91cbcc6594ee571b20e4L1425, specifically this line: https://github.com/apache/hive/blob/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java#L1787, which changed like this in the aforementioned commit:
{code}
- location = wh.getDatabasePath(db.getDatabase(newTable.getDbName()));
+ location = wh.getDatabasePath(db.getDatabase(names[0]));
{code}
So before the database of the new table was used, and now the database of the table from the select is used as I understand it.
NB: This was all inferred from just reading the code, I have not verified it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)