[ https://issues.apache.org/jira/browse/HIVE-26157?focusedWorklogId=765981&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-765981 ]
ASF GitHub Bot logged work on HIVE-26157: ----------------------------------------- Author: ASF GitHub Bot Created on: 04/May/22 13:29 Start Date: 04/May/22 13:29 Worklog Time Spent: 10m Work Description: pvary commented on code in PR #3226: URL: https://github.com/apache/hive/pull/3226#discussion_r864829140 ########## 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: Do we need a test for the dummy URI? Issue Time Tracking ------------------- Worklog Id: (was: 765981) Time Spent: 1h 50m (was: 1h 40m) > Change Iceberg storage handler authz URI to metadata location > ------------------------------------------------------------- > > Key: HIVE-26157 > URL: https://issues.apache.org/jira/browse/HIVE-26157 > Project: Hive > Issue Type: Improvement > Reporter: László Pintér > Assignee: László Pintér > Priority: Major > Labels: pull-request-available > Time Spent: 1h 50m > Remaining Estimate: 0h > > In HIVE-25964, the authz URI has been changed to "iceberg://db.table". > It is possible to set the metadata pointers of table A to point to table B, > and therefore you could read table B's data via querying table A. > {code:sql} > alter table A set tblproperties > ('metadata_location'='/path/to/B/snapshot.json', > 'previous_metadata_location'='/path/to/B/prev_snapshot.json'); {code} -- This message was sent by Atlassian Jira (v8.20.7#820007)