RussellSpitzer commented on code in PR #193:
URL: https://github.com/apache/polaris/pull/193#discussion_r1730628436
##########
polaris-core/src/main/java/io/polaris/core/storage/PolarisStorageConfigurationInfo.java:
##########
@@ -171,11 +177,38 @@ public static Optional<PolarisStorageConfigurationInfo>
forEntityPath(
LOGGER.debug(
"Allowing unstructured table location for entity: {}",
entityPathReversed.get(0).getName());
- return configInfo;
+ return
userSpecifiedWriteLocations(entityPathReversed.get(0).getPropertiesAsMap())
+ .map(
+ locs ->
+ (PolarisStorageConfigurationInfo)
+ new StorageConfigurationOverride(
+ configInfo,
+ ImmutableList.<String>builder()
+
.addAll(configInfo.getAllowedLocations())
+ .addAll(locs)
+ .build()))
+ .orElse(configInfo);
}
});
}
+ private static Optional<List<String>> userSpecifiedWriteLocations(
Review Comment:
Why are we wrapping the list here with an Optional?
--
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]