okumin commented on code in PR #5616:
URL: https://github.com/apache/hive/pull/5616#discussion_r1929985244
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/database/create/CreateDatabaseAnalyzer.java:
##########
@@ -113,6 +114,7 @@ public void analyzeInternal(ASTNode root) throws
SemanticException {
database.setType(DatabaseType.REMOTE);
database.setRemote_dbname(remoteDbName);
}
+ database.setOwnerName(SessionState.getUserFromAuthenticator());
Review Comment:
Thanks. Your statement makes sense. Let me make the last challenge.
We currently encounter the problem of Apache Ranger, and this minimal fix
surely resolves the problem. I agree that this fact supports your opinion.
I'd like to add two perspectives here. First, I think adding owner
information is theoretically not only for Ranger, i.e., another authorization
system or another plugin such as `HiveSemanticAnalyzerHook` can use the
information. Second, the context would be more explicit and less confusing with
a principal type as users don't have to worry that the name is linked to a role
or group. Because of the two reasons, I am guessing aligning this with
`CreateDatabaseOperation` is not a bad investment.
At least, this change will likely work and resolve the problem. So, I don't
have any strong objections to have this merged. Just I want to make a decision
once I get your response as you are more knowledgeable with this part 👍
--
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]