difin commented on code in PR #6449:
URL: https://github.com/apache/hive/pull/6449#discussion_r3349498148
##########
iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/client/HiveRESTCatalogClient.java:
##########
@@ -149,7 +172,11 @@ private void validateCurrentCatalog(String catName) {
@Override
public boolean tableExists(String catName, String dbName, String tableName) {
validateCurrentCatalog(catName);
- return restCatalog.tableExists(TableIdentifier.of(dbName, tableName));
+ TableIdentifier id = TableIdentifier.of(dbName, tableName);
Review Comment:
Changed the method to avoid extra Iceberg API call in case of a view.
> And how the caller will know if (or even, do the want to know) if the
existing object is a view or a table?
Implementation here in REST Catalog client follows same logic as regular
Hive HMS clients which do not care if the existing object is a view or a table:
For example, see `SessionHiveMetaStoreClient.tableExists`
--
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]