nastra commented on code in PR #7188:
URL: https://github.com/apache/iceberg/pull/7188#discussion_r1147444582
##########
core/src/main/java/org/apache/iceberg/LocationProviders.java:
##########
@@ -167,5 +185,42 @@ private static String pathContext(String tableLocation) {
return resolvedContext;
}
+
+ @Override
+ public String dataLocation() {
+ return this.storageLocation;
+ }
+ }
+
+ static class DefaultMetadataLocationProvider implements
MetadataLocationProvider {
+ private static final String METADATA_FOLDER_NAME = "metadata";
+ private String metadataLocation;
+
+ DefaultMetadataLocationProvider(String tableLocation, Map<String, String>
properties) {
+ this.metadataLocation =
+ LocationUtil.stripTrailingSlash(
+ metadataLocation(
+ Preconditions.checkNotNull(tableLocation, "table location
cannot be null"),
Review Comment:
generally it is better to use `Preconditions.checkArgument(... != null,
...)` as it is more descriptive in indicating that something wrong was passed
(rather than surfacing a NPE). See also
https://github.com/apache/iceberg/issues/6625 for some background
--
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]