eric-maynard commented on code in PR #968:
URL: https://github.com/apache/polaris/pull/968#discussion_r1951981322
##########
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:
Yeah, but it is kind of misleading to check for condition X and then print
an error message saying condition (X + Y) is not met.
How about...
```
Invalid metadata file location; metadata file location should be absolute
and must contain `/`: %s
```
--
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]