lcspinter commented on code in PR #3226:
URL: https://github.com/apache/hive/pull/3226#discussion_r864832558


##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java:
##########
@@ -1411,15 +1411,32 @@ public void testCommandsWithPartitionClauseThrow() {
   @Test
   public void testAuthzURI() throws TException, InterruptedException, 
URISyntaxException {
     TableIdentifier target = TableIdentifier.of("default", "target");
-    testTables.createTable(shell, target.name(), 
HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
+    Table table = testTables.createTable(shell, target.name(), 
HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
         PartitionSpec.unpartitioned(), FileFormat.PARQUET, ImmutableList.of());
     org.apache.hadoop.hive.metastore.api.Table hmsTable = 
shell.metastore().getTable(target);
 
     HiveIcebergStorageHandler storageHandler = new HiveIcebergStorageHandler();
     storageHandler.setConf(shell.getHiveConf());
     URI uriForAuth = storageHandler.getURIForAuth(hmsTable);
 
-    Assert.assertEquals("iceberg://" + hmsTable.getDbName() + "/" + 
hmsTable.getTableName(), uriForAuth.toString());
+    Assert.assertEquals("iceberg:/" + URI.create(((BaseTable) 
table).operations().current()
+            .metadataFileLocation()).getPath(), uriForAuth.toString());
+
+  }
+
+  @Test
+  public void testAutzURIWithAuthEnabled() throws TException, 
InterruptedException, URISyntaxException {

Review Comment:
   I'm not sure how can we test this. We would need to halt the create table 
operation before the iceberg table is created. Do you have some suggestions? 



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