jackye1995 commented on code in PR #6586: URL: https://github.com/apache/iceberg/pull/6586#discussion_r1082152137
########## aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogTable.java: ########## @@ -132,6 +134,28 @@ public void testCreateTableBadName() { TableIdentifier.of(namespace, "table-1"), schema, partitionSpec)); } + @Test + public void testCreateAndLoadTableWithoutWarehouseLocation() { + GlueCatalog glueCatalogWithoutWarehouse = new GlueCatalog(); + glueCatalogWithoutWarehouse.initialize( + catalogName, + null, + new AwsProperties(), + glue, + LockManagers.defaultLockManager(), + new S3FileIO(clientFactory::s3), + ImmutableMap.of()); + String namespace = createNamespace(); + String tableName = getRandomName(); + TableIdentifier identifier = TableIdentifier.of(namespace, tableName); + try { + glueCatalog.createTable(identifier, schema, partitionSpec, tableLocationProperties); + glueCatalog.loadTable(identifier); + } catch (RuntimeException e) { + fail("Create and load table without warehouse location should succeed"); Review Comment: yes, I was not able to find a `fail(...)` method that allows taking exception, thus this. Throwing IO exception seems too much, I changed the code to rethrow the runtime exception. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org