simhadri-g commented on a change in pull request #1007:
URL: https://github.com/apache/hive/pull/1007#discussion_r427037871
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeSynchronizer.java
##########
@@ -95,16 +103,27 @@ private void addACLsToBag(
(int) (System.currentTimeMillis() / 1000), GRANTOR,
PrincipalType.USER, false), authorizer));
break;
case COLUMN:
- privBag.addToPrivileges(
- new HiveObjectPrivilege(new
HiveObjectRef(HiveObjectType.COLUMN, dbName, tblName, null, columnName),
- principal, principalType, new
PrivilegeGrantInfo(acl.getKey().toString(),
- (int) (System.currentTimeMillis() / 1000), GRANTOR,
PrincipalType.USER, false), authorizer));
+
+ int privilegeBit = acl.getKey().ordinal();
+ columnPrivilegeBits[privilegeBit] = 1;
+ columnUpdateFlag = true;
+
break;
default:
throw new RuntimeException("Get unknown object type " +
objectType);
}
}
}
+ if (columnUpdateFlag) {
+ String columnPrivilegeBitsString =
Review comment:
InformationSchemaWithPrivilegeTestBase.java used by
TestInformationSchemaWithPrivilegeZookeeperSSL.java and
TestInformationSchemaWithPrivilegeZookeeperPlain.java , will initially add the
acls to mock a table. At this time, the privilege synchroniser is called to
update the privileges. If the privilege string was wrong, the test would have
failed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]