[Bug] Fix a bug that causing error when setting write.data.path to be a subdirectory of the table location
#3371
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #3379
Currently, when updating
write.data.pathof the table to a subdir under the table location, it will fail the location overlap check. For exampleIcebergCatalog.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.pathconflict 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.
Note
This PR only fixes the default code path where
OPTIMIZED_SIBLING_CHECKisfalse. There are more issues(#3378) in the optimized one therefore they should be in a separate PR.Checklist
CHANGELOG.md(if needed)site/content/in-dev/unreleased(if needed)