haizhou-zhao commented on code in PR #6045: URL: https://github.com/apache/iceberg/pull/6045#discussion_r1010582748
########## hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java: ########## @@ -270,9 +275,34 @@ public void testCreateTableWithOwner() throws Exception { Assert.assertEquals(owner, hmsTable.getOwner()); Map<String, String> hmsTableParams = hmsTable.getParameters(); Assert.assertFalse(hmsTableParams.containsKey(TableProperties.HMS_TABLE_OWNER)); + Assert.assertEquals( + PrincipalType.USER.name(), hmsTableParams.get(TableProperties.HMS_TABLE_OWNER_TYPE)); } finally { catalog.dropTable(tableIdent); } + + TableIdentifier tableIdent2 = TableIdentifier.of(DB_NAME, "tbl_group_owned"); + String location2 = temp.newFolder("tbl_group_owned").toString(); + String owner2 = "some_group_owner"; + ImmutableMap<String, String> properties2 = + ImmutableMap.of( + TableProperties.HMS_TABLE_OWNER, + owner2, + TableProperties.HMS_TABLE_OWNER_TYPE, + PrincipalType.GROUP.name()); + + try { + Table table2 = catalog.createTable(tableIdent2, schema, spec, location2, properties2); + org.apache.hadoop.hive.metastore.api.Table hmsTable = + metastoreClient.getTable(DB_NAME, "tbl_group_owned"); + Assert.assertEquals(owner2, hmsTable.getOwner()); + Map<String, String> hmsTableParams = hmsTable.getParameters(); + Assert.assertFalse(hmsTableParams.containsKey(TableProperties.HMS_TABLE_OWNER)); + Assert.assertEquals( + PrincipalType.GROUP.name(), hmsTableParams.get(TableProperties.HMS_TABLE_OWNER_TYPE)); + } finally { + catalog.dropTable(tableIdent2); + } Review Comment: Since table group ownership support is no longer relevant to this PR. This change has also been reverted. -- 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