dlavati-hw commented on a change in pull request #550: HIVE-21198 Introduce a 
database object reference class
URL: https://github.com/apache/hive/pull/550#discussion_r260821879
 
 

 ##########
 File path: 
hcatalog/core/src/main/java/org/apache/hive/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java
 ##########
 @@ -348,8 +348,8 @@ protected void 
authorizeDDLWork(HiveSemanticAnalyzerHookContext cntxt, Hive hive
 
     AlterTableDesc alterTable = work.getAlterTblDesc();
     if (alterTable != null) {
-      Table table = hive.getTable(SessionState.get().getCurrentDatabase(),
-          Utilities.getDbTableName(alterTable.getOldName())[1], false);
+      final String tableName = 
Utilities.getTableName(alterTable.getOldName()).getTable();
+      Table table = hive.getTable(SessionState.get().getCurrentDatabase(), 
tableName, false);
 
 Review comment:
   Do you mean we should refactor getTable(String, String) to 
getTable(TableName)?
   We can try it, but it does mean an additional change of 80 usages.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to