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());