zxl-333 commented on code in PR #5975:
URL: https://github.com/apache/hive/pull/5975#discussion_r2211905515
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -3047,7 +3047,8 @@ private boolean drop_table_core(final RawStore ms, final
String catName, final S
tableDataShouldBeDeleted = checkTableDataShouldBeDeleted(tbl,
deleteData);
if (tableDataShouldBeDeleted && tbl.getSd().getLocation() != null) {
tblPath = new Path(tbl.getSd().getLocation());
- if (!wh.isWritable(tblPath.getParent())) {
+ // HIVE-28804 drop table user should have table path and parent path
permission
Review Comment:
It is quite normal for other users to create the "manage" table as well.
Otherwise, every time a table is created or deleted, the superuser "hive" would
have to be used. A cluster can have hundreds of thousands of tables or even
more. Every time a table is created or deleted, one has to contact the Hive
superuser. The offline SQL scripts all contain operations for creating and
deleting tables. On the YARN queue, it is mapped through the user name and the
queue. This ensures that when running the offline SQL, there won't be a
situation where the creation and deletion of tables are switched to be executed
by the Hive superuser, which is not a reasonable approach. Especially, when
creating tables, there will be expressions like "create table tbl_name as
select". If other users are not allowed to create tables, then the entire
cluster will have to rely solely on the "hive" superuser.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]