pvary commented on code in PR #18424:
URL: https://github.com/apache/iceberg/pull/18424#discussion_r4616129637


##########
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCommits.java:
##########
@@ -321,6 +321,149 @@ public void testAlreadyExistsException() {
         .hasMessage("Table already exists: %s.%s", DB_NAME, TABLE_NAME);
   }
 
+  @Test
+  void alreadyExistsSuccessOnCreate() throws TException, InterruptedException {
+    TableIdentifier identifier = TableIdentifier.of(DB_NAME, "created_tbl");
+    HiveTableOperations ops = (HiveTableOperations) 
catalog.newTableOps(identifier);
+    TableMetadata metadata =
+        TableMetadata.newTableMetadata(
+            SCHEMA,
+            PartitionSpec.unpartitioned(),
+            catalog.defaultWarehouseLocation(identifier),
+            ImmutableMap.of());
+    HiveTableOperations spyOps = spy(ops);

Review Comment:
   This code path is repeated multiple times. Any better solution?



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