ayushtkn commented on code in PR #4963:
URL: https://github.com/apache/polaris/pull/4963#discussion_r3519348296


##########
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:
   I noticed this while writing the tests—`validateMetadataFileInTableDir` 
strictly reads from the realm-level configuration and ignores the catalog-level 
overrides, meaning a catalog configured with 
`ALLOW_EXTERNAL_TABLE_LOCATION`=true will still be blocked by this check.
   
   Since this exact same split-brain configuration bug currently exists for 
`registerTable`, I opted to keep the implementation as-is to bring 
`registerView` into strict behavioral parity with tables.
   
   I plan to chase that separately if people agree that ain't deliberate rather 
than expanding the scope here



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