rdblue commented on a change in pull request #1495:
URL: https://github.com/apache/iceberg/pull/1495#discussion_r501161499
##########
File path:
hive-metastore/src/test/java/org/apache/iceberg/hive/HiveCreateReplaceTableTest.java
##########
@@ -104,8 +105,8 @@ public void testCreateTableTxnTableCreatedConcurrently() {
AssertHelpers.assertThrows(
"Create table txn should fail",
- AlreadyExistsException.class,
- "Table already exists: hivedb.tbl",
+ CommitFailedException.class,
+ "is not same as the current table metadata",
Review comment:
I don't think this is correct. Looks like this is happening because we
always try to load the table, so the create path (the previous `else` case
after checking `base != null`) is not taken.
I think the logic should be: if the table exists, then check whether we are
trying to create it (base is null). If we are trying to create it, validate
that it is in a state that can be created: the table should have type
"iceberg", but should _not_ have a metadata location. If it has a metadata
location, then the table already exists and it should throw the original
`AlreadyExistsException`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]