Will-Lo commented on a change in pull request #3459:
URL: https://github.com/apache/gobblin/pull/3459#discussion_r800261351



##########
File path: 
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveCopyEntityHelper.java
##########
@@ -750,9 +751,14 @@ else if (desiredTargetExistingPaths.size() > 0) {
 
   private void checkPartitionedTableCompatibility(Table desiredTargetTable, 
Table existingTargetTable)
       throws IOException {
-    if 
(!desiredTargetTable.getDataLocation().equals(existingTargetTable.getDataLocation()))
 {
-      throw new 
HiveTableLocationNotMatchException(desiredTargetTable.getDataLocation(),
-          existingTargetTable.getDataLocation());
+    try {
+      if (!this.targetFs.resolvePath(desiredTargetTable.getDataLocation())
+          
.equals(this.targetFs.resolvePath(existingTargetTable.getDataLocation()))) {
+        throw new 
HiveTableLocationNotMatchException(desiredTargetTable.getDataLocation(), 
existingTargetTable.getDataLocation());

Review comment:
       I think a scenario where the paths match exactly but fail when using 
`resolvePath()` should never happen, since resolvePath in this scenario would 
just be validating their FS is equivalent (logical vs physical paths). If it 
fails the `resolvePath()`, there should still be some noticeable difference in 
the paths such that the user can discern some sort of meaning.




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


Reply via email to