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



##########
File path: 
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/UnpartitionedTableFileSet.java
##########
@@ -64,11 +65,21 @@ public UnpartitionedTableFileSet(String name, HiveDataset 
dataset, HiveCopyEntit
 
     Optional<Table> existingTargetTable = this.helper.getExistingTargetTable();
     if (existingTargetTable.isPresent()) {
-      if 
(!this.helper.getTargetTable().getDataLocation().equals(existingTargetTable.get().getDataLocation()))
 {
+      boolean path_mismatch = false;
+      try {
+        if 
(!this.helper.getTargetFs().resolvePath(this.helper.getTargetTable().getDataLocation())
+            
.equals(this.helper.getTargetFs().resolvePath(existingTargetTable.get().getDataLocation())))
 {
+          path_mismatch = true;
+        }
+      } catch (FileNotFoundException e) {
+        // If desired path does not exist, then user is defining a different 
snapshot path so check policy
+        path_mismatch = true;
+      }
+      if (path_mismatch) {

Review comment:
       Ah good suggestion, will implement it this way




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