deniskuzZ commented on code in PR #3247:
URL: https://github.com/apache/hive/pull/3247#discussion_r906402476


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/misc/rename/AbstractAlterTableRenameAnalyzer.java:
##########
@@ -49,6 +55,11 @@ protected void analyzeCommand(TableName tableName, 
Map<String, String> partition
       setAcidDdlDesc(desc);
     }
     addInputsOutputsAlterTable(tableName, null, desc, desc.getType(), false);
+    String newDatabaseName = target.getDb() != null ? target.getDb() : 
table.getDbName(); // extract new database name from new table name, if not 
specified, then src dbname is used
+    Database newDatabase = getDatabase(newDatabaseName);
+    outputs.add(new WriteEntity(newDatabase, 
WriteEntity.WriteType.DDL_SHARED));
+    Table newTable = new Table(target.getDb(), target.getTable());

Review Comment:
   I am not 100% sure, but shouldn't we propagate back from original table it's 
parameters, type, temp attribute, etc. See `DDLUtils.addDbAndTableToOutputs` & 
`SemanticAnalyzer.addDbAndTabToOutputs`



-- 
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]

Reply via email to