flyrain commented on code in PR #1191:
URL: https://github.com/apache/polaris/pull/1191#discussion_r2004474260
##########
polaris-core/src/main/java/org/apache/polaris/core/storage/FileStorageConfigurationInfo.java:
##########
@@ -53,4 +54,15 @@ public void validatePrefixForStorageType(String loc) {
"Location prefix not allowed: '%s', expected prefix: file:// or
/ or *", loc));
}
}
+
+ public @Nonnull FileStorageConfigurationInfo merge(@Nonnull
FileStorageConfigurationInfo other) {
+ if (other.getStorageType() != this.getStorageType()) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Storage type mismatch: %s vs %s", this.getStorageType(),
other.getStorageType()));
+ }
Review Comment:
Minor: we could use precondition here.
```
Preconditions.checkArgument(other.getStorageType() ==
this.getStorageType(),
String.format(
"Storage type mismatch: %s vs %s", this.getStorageType(),
other.getStorageType()));
```
--
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]