hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergio Peña (JIRA) <>
Subject [jira] [Commented] (HIVE-11427) Location of temporary table for CREATE TABLE SELECT broken by HIVE-7079
Date Thu, 14 Apr 2016 19:45:25 GMT


Sergio Peña commented on HIVE-11427:

You're right. At the end, the security issue was still there before.
So the code looks right.

Let's wait for tests before doing the commit.

> Location of temporary table for CREATE TABLE  SELECT broken by HIVE-7079
> ------------------------------------------------------------------------
>                 Key: HIVE-11427
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Grisha Trubetskoy
>            Assignee: Yongzhi Chen
>         Attachments: HIVE-11427.1.patch, HIVE-11427.2.patch
> 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 using
CREATE TABLE AS SELECT from a table in the default database, the following happens:
> {code}
> use default;
> create table grisha.blahblah as select * from some_table;
> FAILED: SemanticException 0:0 Error creating temporary folder on: hdfs://
Error encountered near token 'TOK_TMP_FILE’
> {code}
> I've edited this issue because my initial explanation was completely bogus. A more likely
explanation is in
> {code}
>  -                fname = ctx.getExternalTmpPath(
>  +                fname = ctx.getExtTmpPathRelTo(  
>     // and then something incorrect happens in getExtTmpPathRelTo()
> {code}
> In any event - the bug is that the location chosen for the temporary storage is not in
the same place as the target table. It should be same as the target table (/user/hive/warehouse/grisha.db
in the above example) because this is where presumably the user running the query would have
write permissions to.

This message was sent by Atlassian JIRA

View raw message