nastra commented on code in PR #10001: URL: https://github.com/apache/iceberg/pull/10001#discussion_r1535416777
########## hive-metastore/src/main/java/org/apache/iceberg/hive/HiveOperationsBase.java: ########## @@ -62,6 +82,48 @@ interface HiveOperationsBase { String table(); + String catalogName(); + + ContentType contentType(); + + default Table loadHmsTable() throws TException, InterruptedException { + try { + return metaClients().run(client -> client.getTable(database(), table())); + } catch (NoSuchObjectException nte) { + LOG.trace( + "{} not found {}", contentType(), catalogName() + "." + database() + "." + table(), nte); + return null; + } + } + + default void setCommonHmsParameters( + Table tbl, + String tableTypeProp, + String newMetadataLocation, + Schema schema, + String uuid, + Set<String> obsoleteProps, + Supplier<String> previousLocationSupplier) { + Map<String, String> parameters = + Optional.ofNullable(tbl.getParameters()).orElseGet(Maps::newHashMap); + + if (!obsoleteProps.contains(TableProperties.UUID) && uuid != null) { + parameters.put(TableProperties.UUID, uuid); Review Comment: In https://github.com/apache/iceberg/pull/9852/files#diff-db46657b84d66e084e15f31b8dab21577efb2ae7102863f94c6c9477782de676R206 you're passing the View UUID and I wonder whether this is actually correct to do so? This is another example where it can be dangerous to have a common method to set something that seems could be common across tables/views. I would suggest to remove `setCommonHmsParameters()` from this API -- 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