[ https://issues.apache.org/jira/browse/HIVE-26055?focusedWorklogId=774087&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-774087 ]
ASF GitHub Bot logged work on HIVE-26055: ----------------------------------------- Author: ASF GitHub Bot Created on: 24/May/22 15:45 Start Date: 24/May/22 15:45 Worklog Time Spent: 10m Work Description: saihemanth-cloudera commented on code in PR #3247: URL: https://github.com/apache/hive/pull/3247#discussion_r880680410 ########## ql/src/java/org/apache/hadoop/hive/ql/ddl/table/misc/rename/AbstractAlterTableRenameAnalyzer.java: ########## @@ -49,6 +55,13 @@ protected void analyzeCommand(TableName tableName, Map<String, String> partition setAcidDdlDesc(desc); } addInputsOutputsAlterTable(tableName, null, desc, desc.getType(), false); +// inputs.add(new ReadEntity(table)); + outputs.clear(); Review Comment: Yeah, I had to do this here. Reason: When a user executes Alter table foo rename to otherdatabase.foo2; we never send the otherdatabase and new table name (foo2) objects for authorization. We need to check whether the end-user has privileges to create a table in otherdatabase. So I think this special logic has to be in AbstractTableRenameAnalyzer instead of AbstractTableAnalyzer. Issue Time Tracking ------------------- Worklog Id: (was: 774087) Time Spent: 50m (was: 40m) > Fix the HivePrivilegesObjects for Alter table rename command > ------------------------------------------------------------ > > Key: HIVE-26055 > URL: https://issues.apache.org/jira/browse/HIVE-26055 > Project: Hive > Issue Type: Bug > Components: HiveServer2, Security > Reporter: Sai Hemanth Gantasala > Assignee: Sai Hemanth Gantasala > Priority: Major > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > Fix the HivePrivilegeObjects for Alter table rename query in a way that it > includes source table information in the output objects and destination table > information in the input objects. > -- This message was sent by Atlassian Jira (v8.20.7#820007)