rtrivedi12 commented on code in PR #5689:
URL: https://github.com/apache/hive/pull/5689#discussion_r2032278719
##########
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/events/CreateTableEvent.java:
##########
@@ -62,11 +67,26 @@ private List<HivePrivilegeObject> getInputHObjs() {
List<HivePrivilegeObject> ret = new ArrayList<>();
PreCreateTableEvent event = (PreCreateTableEvent) preEventContext;
Table table = event.getTable();
- String uri = getSdLocation(table.getSd());
+ Database database = event.getDatabase();
+ String uri = getSdLocation(table.getSd());
- if (StringUtils.isNotEmpty(uri)) {
+ if (StringUtils.isEmpty(uri)) {
+ return ret;
+ }
+
+ boolean isExternalTable =
table.getTableType().equalsIgnoreCase(TableType.EXTERNAL_TABLE.toString());
Review Comment:
Yes, it works and looks clean. Amended to use
`MetaStoreUtils.isExternalTable(table);`
--
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]