Copilot commented on code in PR #4963:
URL: https://github.com/apache/polaris/pull/4963#discussion_r3519318941
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalog.java:
##########
@@ -1025,6 +1028,7 @@ public View registerView(TableIdentifier identifier,
String metadataFileLocation
InputFile metadataFile = fileIO.newInputFile(metadataFileLocation);
ViewMetadata metadata = ViewMetadataParser.read(metadataFile);
+ validateMetadataFileInTableDir(identifier, metadata.location(),
metadataFileLocation);
ops.commit(null, metadata);
Review Comment:
`registerView` now calls `validateMetadataFileInTableDir(...)`, which checks
`FeatureConfiguration.ALLOW_EXTERNAL_TABLE_LOCATION` via
`realmConfig.getConfig(...)` (realm-level) rather than a catalog override.
Since `ALLOW_EXTERNAL_TABLE_LOCATION` is defined as a catalog-configurable
flag, this means a catalog setting like
`polaris.config.allow.external.table.location=true` will not relax the
metadata-in-table-dir check for view registration (same for tables), which may
cause unexpected `BadRequestException`s when external locations are intended to
be allowed.
--
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]