eric-maynard commented on code in PR #1686:
URL: https://github.com/apache/polaris/pull/1686#discussion_r2138365051
##########
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -1049,8 +1069,41 @@ private void validateNoLocationOverlap(
* base-location property of each. The target entity's base location may not
be a prefix or a
* suffix of any sibling entity's base location.
*/
- private void validateNoLocationOverlap(
- String location, List<PolarisEntity> parentPath, String name) {
+ private <T extends PolarisEntity & LocationBasedEntity> void
validateNoLocationOverlap(
+ T entity, List<PolarisEntity> parentPath) {
+
+ String location = entity.getBaseLocation();
+ String name = entity.getName();
+
+ // Attempt to directly query for siblings
+ boolean useOptimizedSiblingCheck =
Review Comment:
Each persistence implementation does decide this by deciding whether to
implement the new method, but there's an additional flag on the service level
for another layer of protection.
--
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]