flyrain commented on a change in pull request #3094:
URL: https://github.com/apache/iceberg/pull/3094#discussion_r705813395



##########
File path: core/src/main/java/org/apache/iceberg/LocationProviders.java
##########
@@ -141,4 +133,18 @@ private static String stripTrailingSlash(String path) {
     }
     return result;
   }
+
+  public static String dataLocation(Map<String, String> properties, String 
tableLocation) {
+    String dataLocation = properties.get(TableProperties.WRITE_DATA_LOCATION);
+    if (dataLocation == null) {
+      dataLocation = properties.get(TableProperties.OBJECT_STORE_PATH);
+      if (dataLocation == null) {
+        dataLocation = 
properties.get(TableProperties.WRITE_FOLDER_STORAGE_LOCATION);
+        if (dataLocation == null) {
+          dataLocation = String.format("%s/data", tableLocation);
+        }
+      }
+    }
+    return dataLocation;
+  }

Review comment:
       `testObjectStorageLocationProviderPathResolution` is for that. Will add 
warn log.




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

Reply via email to