You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by GitBox <gi...@apache.org> on 2019/02/27 16:08:43 UTC

[GitHub] dlavati-hw commented on a change in pull request #550: HIVE-21198 Introduce a database object reference class

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:
users@infra.apache.org


With regards,
Apache Git Services