eric-maynard commented on code in PR #968:
URL: https://github.com/apache/polaris/pull/968#discussion_r1951982049


##########
service/common/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java:
##########
@@ -309,12 +309,18 @@ public Table registerTable(TableIdentifier identifier, 
String metadataFileLocati
         metadataFileLocation != null && !metadataFileLocation.isEmpty(),
         "Cannot register an empty metadata file location as a table");
 
+    int lastSlashIndex = metadataFileLocation.lastIndexOf("/");
+    Preconditions.checkArgument(
+        lastSlashIndex != -1,
+        "Invalid metadata file location: %s, must be a full path to a file",

Review Comment:
   To be clear, I don't think making this check for an absolute path is 
strictly a blocker here; we can (should?) file an issue to track that if need 
be. But let's please try to swiftly get rid of the 500



##########
service/common/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java:
##########
@@ -309,12 +309,18 @@ public Table registerTable(TableIdentifier identifier, 
String metadataFileLocati
         metadataFileLocation != null && !metadataFileLocation.isEmpty(),
         "Cannot register an empty metadata file location as a table");
 
+    int lastSlashIndex = metadataFileLocation.lastIndexOf("/");
+    Preconditions.checkArgument(
+        lastSlashIndex != -1,
+        "Invalid metadata file location: %s, must be a full path to a file",

Review Comment:
   To be clear, I don't think making this check for an absolute path is 
strictly a blocker here; we can file an issue to track that if need be. But 
let's please try to swiftly get rid of the 500



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