deniskuzZ commented on code in PR #3247:
URL: https://github.com/apache/hive/pull/3247#discussion_r911074669


##########
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLStdHiveAuthorizationValidator.java:
##########
@@ -80,15 +80,15 @@ public void checkPrivileges(HiveOperationType hiveOpType, 
List<HivePrivilegeObje
 
     // check privileges on input and output objects
     List<String> deniedMessages = new ArrayList<String>();
-    checkPrivileges(hiveOpType, inputHObjs, metastoreClient, userName, 
IOType.INPUT, deniedMessages);
-    checkPrivileges(hiveOpType, outputHObjs, metastoreClient, userName, 
IOType.OUTPUT, deniedMessages);
+    checkPrivileges(hiveOpType, inputHObjs, metastoreClient, userName, 
IOType.INPUT, deniedMessages, false);
+    checkPrivileges(hiveOpType, outputHObjs, metastoreClient, userName, 
IOType.OUTPUT, deniedMessages, hiveOpType == 
HiveOperationType.ALTERTABLE_RENAME ? true: false);

Review Comment:
   no need for a ternary operator here, just:
   ````
   hiveOpType == HiveOperationType.ALTERTABLE_RENAME
   ````



-- 
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]

Reply via email to