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


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java:
##########
@@ -772,10 +772,21 @@ we use isExternal and not tableType() method since that 
always gives type as man
         tgtPath = new Path(table.getDataLocation().toString(),
             Warehouse.makePartPath(partSpec.getPartSpec()));
       } else {
-        Database parentDb = x.getHive().getDatabase(tblDesc.getDatabaseName());
-        tgtPath = new Path(
-            wh.getDefaultTablePath( parentDb, tblDesc.getTableName(), 
tblDesc.isExternal()),
-            Warehouse.makePartPath(partSpec.getPartSpec()));
+        try {
+          Table translatedTable =

Review Comment:
   can we extract the get location logic and then construct the final tgt path?
   ````
   String path = getDataLocation(tblDesc, table, partSpec);
   tgtPath = new Path(path, Warehouse.makePartPath(partSpec.getPartSpec()));
   ````
   



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to