Skip to content

Commit

Permalink
HIVE-28716: Add owner information in HivePrivilegeObject for create d…
Browse files Browse the repository at this point in the history
…atabase query

Check RANGER-5097 for more info
  • Loading branch information
Aggarwal-Raghav committed Jan 21, 2025
1 parent 5146dba commit a82bd50
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer;
import org.apache.hadoop.hive.ql.parse.HiveParser;
import org.apache.hadoop.hive.ql.parse.SemanticException;
import org.apache.hadoop.hive.ql.session.SessionState;

/**
* Analyzer for database creation commands.
Expand Down Expand Up @@ -103,6 +104,7 @@ public void analyzeInternal(ASTNode root) throws SemanticException {
if (managedLocationUri != null) {
database.setManagedLocationUri(managedLocationUri);
}
database.setOwnerName(SessionState.getUserFromAuthenticator());
} else {
String remoteDbName = databaseName;
if (props != null && props.get("connector.remoteDbName") != null) // TODO finalize the property name
Expand Down

0 comments on commit a82bd50

Please sign in to comment.