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, partSpec, table);
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: [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]