nastra commented on code in PR #12892:
URL: https://github.com/apache/iceberg/pull/12892#discussion_r2757885352


##########
core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java:
##########
@@ -1025,6 +1027,86 @@ public void testRenameTable() {
     assertEmpty("Should not contain table after drop", catalog, NS);
   }
 
+  @Test
+  public void createTableInUniqueLocation() {
+    Map<String, String> additionalProperties =
+        ImmutableMap.of(CatalogProperties.UNIQUE_TABLE_LOCATION, "true");
+    C catalog = initCatalog("uniq_path_catalog", additionalProperties);
+
+    if (requiresNamespaceCreate()) {
+      catalog.createNamespace(NS);
+    }
+
+    catalog.createTable(TABLE, SCHEMA, PartitionSpec.unpartitioned());
+    catalog.renameTable(TABLE, RENAMED_TABLE);
+    catalog.createTable(TABLE, SCHEMA, PartitionSpec.unpartitioned());
+
+    Table table = catalog.loadTable(TABLE);
+    Table renamedTable = catalog.loadTable(RENAMED_TABLE);
+
+    assertThat(table.location())
+        .as("Tables %s and %s have different location", TABLE, RENAMED_TABLE)
+        .isNotEqualTo(renamedTable.location());
+  }
+
+  @Test
+  public void dropAfterRenameDoesntCorruptTable() throws IOException {

Review Comment:
   just curious but is the expectation here that this would fail without the 
diff from the PR? I applied this test locally without anything else and that 
passes across catalogs



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to