nastra commented on code in PR #12892:
URL: https://github.com/apache/iceberg/pull/12892#discussion_r2745094447
##########
core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java:
##########
@@ -1025,6 +1031,94 @@ public void testRenameTable() {
assertEmpty("Should not contain table after drop", catalog, NS);
}
+ @Test
+ public void testCreateTableInUniqueLocation() {
+ assumeThat(supportsUniqueTableLocation())
+ .as("Only valid for catalogs that support unique table location")
+ .isTrue();
+
+ 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 testDropDoesntCorruptTable() throws IOException {
Review Comment:
I would maybe slightly rename this to `dropAfterRenameDoesntCorruptTable()`
to make it clearer that it's a drop after a rename
--
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]