[jira] [Created] (HIVE-24256) REPL LOAD fails because of unquoted column name

2020-10-10 Thread Viacheslav Avramenko (Jira)
Viacheslav Avramenko created HIVE-24256:
---

 Summary: REPL LOAD fails because of unquoted column name
 Key: HIVE-24256
 URL: https://issues.apache.org/jira/browse/HIVE-24256
 Project: Hive
  Issue Type: Bug
Reporter: Viacheslav Avramenko
Assignee: Naresh P R


 
{code:java}
CREATE EXTERNAL TABLE dbs(db_id bigint, db_location_uri string, name string, 
owner_name string, owner_type string) STORED BY 
'org.apache.hive.storage.jdbc.JdbcStorageHandler' TBLPROPERTIES 
('hive.sql.database.type'='METASTORE', 'hive.sql.query'='SELECT `DB_ID`, 
`DB_LOCATION_URI`, `NAME`, `OWNER_NAME`, `OWNER_TYPE` FROM `DBS`'); 
{code}
==> Wrong Result <==
{code:java}
set hive.limit.optimize.enable=true;
select * from dbs limit 1;
--
 VERTICES MODE STATUS TOTAL COMPLETED RUNNING PENDING FAILED KILLED
--
Map 1 .. container SUCCEEDED 0 0 0 0 0 0
--
VERTICES: 01/01 [==>>] 100% ELAPSED TIME: 0.91 s
--
++--+---+-+-+
| dbs.db_id | dbs.db_location_uri | dbs.name | dbs.owner_name | dbs.owner_type |
++--+---+-+-+
++--+---+-+-+
{code}
==> Correct Result <==
{code:java}
set hive.limit.optimize.enable=false;
select * from dbs limit 1;
--
VERTICES  MODESTATUS  TOTAL  COMPLETED  RUNNING  PENDING  
FAILED  KILLED
--
Map 1 .. container SUCCEEDED  1  100
   0   0
--
VERTICES: 01/01  [==>>] 100%  ELAPSED TIME: 4.11 s
--+++---+-+-+
| dbs.db_id  |dbs.db_location_uri | dbs.name  | 
dbs.owner_name  | dbs.owner_type  |
+++---+-+-+
| 1  | hdfs://abcd:8020/warehouse/tablespace/managed/hive | default   | 
public  | ROLE|
+++---+-+-+{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (HIVE-24250) CREATE DATABASE with MANAGEDLOCATION set requires super user priv on location

2020-10-09 Thread Viacheslav Avramenko (Jira)
Viacheslav Avramenko created HIVE-24250:
---

 Summary: CREATE DATABASE with MANAGEDLOCATION set requires super 
user priv on location
 Key: HIVE-24250
 URL: https://issues.apache.org/jira/browse/HIVE-24250
 Project: Hive
  Issue Type: Bug
  Components: Metastore
Affects Versions: 4.0.0
Reporter: Viacheslav Avramenko


At  
[https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java#L1485]

Folder for Database is created as superuser, instead of impersonated one.

This leads to issues when impersonation is on (doAs =true) and superuser have 
no access to location specified in MANAGEDLOCATION of CREATE DATABASE.

If I am, as a user, specify a location where to create my database, I should 
have write access there.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)