From 7e5d00d58a684a2ab453bd9a68cc55bcdce00fc9 Mon Sep 17 00:00:00 2001 From: Robert Stupp Date: Mon, 24 Nov 2025 09:37:25 +0100 Subject: [PATCH] Iceberg-Catalog: also set catalog-id for location overlap checks --- .../polaris/service/catalog/iceberg/IcebergCatalog.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java b/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java index e8f5402b1b..422b8e0253 100644 --- a/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java +++ b/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java @@ -984,12 +984,14 @@ private void validateNoLocationOverlap( // Create a fake IcebergTableLikeEntity to check for overlap, since no real entity // has been created yet. + var lastNamespace = resolvedNamespace.getLast(); IcebergTableLikeEntity virtualEntity = IcebergTableLikeEntity.of( new PolarisEntity.Builder() .setType(PolarisEntityType.TABLE_LIKE) .setSubType(PolarisEntitySubType.ICEBERG_TABLE) - .setParentId(resolvedNamespace.getLast().getId()) + .setParentId(lastNamespace.getId()) + .setCatalogId(lastNamespace.getCatalogId()) .setProperties(Map.of(PolarisEntityConstants.ENTITY_BASE_LOCATION, location)) .build());