You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2022/02/07 01:03:21 UTC

[GitHub] [gobblin] Will-Lo commented on a change in pull request #3459: [GOBBLIN-1602] Change hive table location and partition check to validate using FS r…

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: dev-unsubscribe@gobblin.apache.org

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