zhangbutao commented on code in PR #3218:
URL: https://github.com/apache/hive/pull/3218#discussion_r2422617522


##########
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HivePrivilegeObject.java:
##########
@@ -144,20 +162,22 @@ public enum HivePrivObjectActionType {
   // is applied to the table.
   private String rowFilterExpression;
 
-  public HivePrivilegeObject(HivePrivilegeObjectType type, String dbname, 
String objectName) {
-    this(type, dbname, objectName, HivePrivObjectActionType.OTHER);
+  public HivePrivilegeObject(HivePrivilegeObjectType type, String objectName) {

Review Comment:
   This change here introduces a breaking compatibility issue for downstream 
systems like Apache Ranger. Apache Ranger utilizes the `HivePrivilegeObject` 
class from Hive for initializing relevant authorization objects, and there are 
multiple places where the constructors of `HivePrivilegeObject` are used. 
   
   For example:
    
https://github.com/apache/ranger/blob/0e12d7317169d1e4c7f9712f4ae17baf6aeeed1e/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java#L2587,
 
   
   and 
https://github.com/apache/ranger/blob/0e12d7317169d1e4c7f9712f4ae17baf6aeeed1e/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java#L2747.
 
   
   We need to consider retaining these existing constructors to avoid 
compatibility issues for downstream systems like Apache Ranger.
   
   My idea is to wait until Hive has fully implemented all the features of the 
Federated Catalog, and Apache Ranger has adopted the new `HivePrivilegeObject` 
constructors to implement Hive's catalog related authorization. Only then can 
we safely remove the original `HivePrivilegeObject` constructors.



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