This is an automated email from the ASF dual-hosted git repository. ayushsaxena pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push: new 73af4cd7098 HIVE-28260: CreateTableEvent wrongly skips authorizing DFS_URI for managed table. (#5250). (Ayush Saxena, reviewed by Sourabh Badhya, Attila Turoczy) 73af4cd7098 is described below commit 73af4cd7098cc24b486cf68afba39f6e709be54f Author: Ayush Saxena <ayushsax...@apache.org> AuthorDate: Wed May 15 11:16:29 2024 +0530 HIVE-28260: CreateTableEvent wrongly skips authorizing DFS_URI for managed table. (#5250). (Ayush Saxena, reviewed by Sourabh Badhya, Attila Turoczy) --- .../authorization/plugin/metastore/events/CreateTableEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/events/CreateTableEvent.java b/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/events/CreateTableEvent.java index 5efb02b7b7c..4099405abe9 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/events/CreateTableEvent.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/events/CreateTableEvent.java @@ -82,7 +82,7 @@ public class CreateTableEvent extends HiveMetaStoreAuthorizableEvent { ret.add(getHivePrivilegeObject(database)); ret.add(getHivePrivilegeObject(table)); - if (StringUtils.isNotEmpty(uri) && table.getTableType() != TableType.EXTERNAL_TABLE.toString()) { + if (StringUtils.isNotEmpty(uri) && !TableType.EXTERNAL_TABLE.toString().equalsIgnoreCase(table.getTableType())) { ret.add(new HivePrivilegeObject(HivePrivilegeObjectType.DFS_URI, null, uri)); }