HonahX opened a new pull request, #3371:
URL: https://github.com/apache/polaris/pull/3371

   <!--
   ๐Ÿ“ Describe what changes you're proposing, especially breaking or user-facing 
changes. 
   ๐Ÿ“– See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more.
   -->
   Currently, when updating `write.data.path` of the table to a subdir under 
the table location, it will fail the location overlap check. For example
   ```
   spark-sql> ALTER TABLE tb1 SET TBLPROPERTIES (
     'write.data.path' = '<tableLocation>/alternative_data'
   );
   
   org.apache.iceberg.exceptions.ForbiddenException: Forbidden: Unable to 
create table at location 's3://<table_location>' because it conflicts with 
existing table or namespace at location 's3://<table_location>`
   ```
   
   IcebergCatalog.validateNoLocationOverlap(...) constructs a virtual 
PolarisEntity for overlap checking, but it did not set the entity name. When 
fetching the siblings of the table, it fails to filter out itself and thus the 
check mistaken considered that the `write.data.path` conflict with the table's 
own base location. (isChildOf)
   
   This PR fix the issue by adding name to the virtual PolarisEntity and add a 
unit and a integration test.
   
   Still in draft since it has some TODOs, but sent out first in case someone 
else has encountered similar issues.
   ## TODO
   
   - [ ] Verify if we need the fix too when `OPTIMIZED_SIBLING_CHECK` is 
enabled.
   
   ## Checklist
   - [ ] ๐Ÿ›ก๏ธ Don't disclose security issues! (contact [email protected])
   - [ ] ๐Ÿ”— Clearly explained why the changes are needed, or linked related 
issues: Fixes #
   - [ ] ๐Ÿงช Added/updated tests with good coverage, or manually tested (and 
explained how)
   - [ ] ๐Ÿ’ก Added comments for complex logic
   - [ ] ๐Ÿงพ Updated `CHANGELOG.md` (if needed)
   - [ ] ๐Ÿ“š Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


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