henrib commented on code in PR #6022:
URL: https://github.com/apache/hive/pull/6022#discussion_r2273106827


##########
iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -434,6 +459,7 @@ public boolean tableExists(TableIdentifier identifier) {
     }
   }
 
+

Review Comment:
   The cache in HIVE-29035 is limited to serving loadTable() for REST and 
resides server-side; the Table objects it serves are marshaled by to a client 
so there is no 'external' instance sharing. It is dependent upon HMS being the 
actual catalog implementation to acquire the latest known metadata location for 
a given table. This makes this PR pretty much tied to Hive; there is no need to 
involve Iceberg.
   If/when the Iceberg community accepts the TableMetadata caching you propose, 
we can then assess what it means for this cache implementation. 



##########
iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -408,23 +410,46 @@ private void validateTableIsIcebergTableOrView(
    */
   @Override
   public boolean tableExists(TableIdentifier identifier) {
+    return Objects.nonNull(fetchTable(identifier));
+  }
+
+  /**
+   * Check whether table exists and return its current metadata location.
+   *
+   * <p>Note: If a hive table with the same identifier exists in catalog, this 
method will return
+   * {@code null}.
+   *
+   * @param identifier a table identifier
+   * @return the location of the table if it exists, null otherwise
+   */
+  public String getTableMetadataLocation(TableIdentifier identifier) {

Review Comment:
   Iceberg PR: https://github.com/apache/iceberg/issues/13800



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to