dimas-b commented on code in PR #3409:
URL: https://github.com/apache/polaris/pull/3409#discussion_r2756404246


##########
polaris-core/src/main/java/org/apache/polaris/core/storage/PolarisStorageConfigurationInfo.java:
##########
@@ -105,6 +107,17 @@ public String serialize() {
     }
   }
 
+  public Optional<String> resolveStorageName() {
+    if (getAllowedLocations().isEmpty()) {
+      return Optional.empty();
+    }
+    try {
+      return Optional.ofNullable(new 
URI(getAllowedLocations().get(0)).getHost());

Review Comment:
   Custom parsing may be sufficient in this particular case, but this issue 
will come up again, in a different context, I'm pretty sure.
   
   I'd personally back-port 
[StorageUri](https://github.com/projectnessie/nessie/blob/main/tools/storage/uri/src/main/java/org/projectnessie/storage/uri/StorageUri.java)
 to Polaris as I obviously trust the code :sweat_smile: We could put it into 
`StorageLocation` or a new class. I wonder what other people think about this.



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

Reply via email to