marton-bod commented on code in PR #3226:
URL: https://github.com/apache/hive/pull/3226#discussion_r854160373


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -450,7 +452,9 @@ public boolean isValidMetadataTable(String metaTableName) {
   public URI getURIForAuth(org.apache.hadoop.hive.metastore.api.Table 
hmsTable) throws URISyntaxException {
     String dbName = hmsTable.getDbName();
     String tableName = hmsTable.getTableName();
-    return new URI(ICEBERG_URI_PREFIX + dbName + "/" + tableName);
+    Table table = IcebergTableUtil.getTable(conf, hmsTable);

Review Comment:
   We ran into problems with the approach of loading the Iceberg table here 
before. The problem is that this method can be called to authorize CREATE TABLE 
commands as well, at which point the iceberg table does not exist yet, so this 
will lead to NPE.
   
   If the table object is null, then maybe we can use the 
hmsTable.getSd().location() + "/metadata"? I'm not sure though, just thinking 
out loud 



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