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


##########
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCachingCatalog.java:
##########
@@ -63,6 +69,96 @@ public List<Namespace> listNamespaces(Namespace nmspc) 
throws NoSuchNamespaceExc
     return hiveCatalog.listNamespaces(nmspc);
   }
 
+  protected void cacheInvalidateInc(TableIdentifier tid) {
+    // This method is intentionally left empty. It can be overridden in 
subclasses if needed.
+  }
+
+  protected void cacheLoadInc(TableIdentifier tid) {
+    // This method is intentionally left empty. It can be overridden in 
subclasses if needed.
+  }
+
+  protected void cacheHitInc(TableIdentifier tid) {
+    // This method is intentionally left empty. It can be overridden in 
subclasses if needed.
+  }
+
+  protected void cacheMissInc(TableIdentifier tid) {
+    // This method is intentionally left empty. It can be overridden in 
subclasses if needed.
+  }
+
+  protected void cacheMetaLoadInc(TableIdentifier tid) {
+    // This method is intentionally left empty. It can be overridden in 
subclasses if needed.
+  }
+
+  /**
+   * Gets the metadata file location of a table.
+   *
+   * @param table the table
+   * @return the location of the metadata file, or null if the table does not 
have a location
+   */
+  protected static String getMetadataLocation(final Table table) {
+    if (table instanceof HasTableOperations tableOps) {
+      final TableOperations ops = tableOps.operations();
+      final TableMetadata meta;
+      if (ops != null && (meta = ops.current()) != null) {

Review Comment:
   if can't be null, check iceberg code. I don't think we need method for that
   ````
   if (table instanceof HasTableOperations tableOp) {
     metadataLocation = tableOp.operations().current().metadataFileLocation();
   }
   ````
   



##########
standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCachingCatalog.java:
##########
@@ -63,6 +69,96 @@ public List<Namespace> listNamespaces(Namespace nmspc) 
throws NoSuchNamespaceExc
     return hiveCatalog.listNamespaces(nmspc);
   }
 
+  protected void cacheInvalidateInc(TableIdentifier tid) {
+    // This method is intentionally left empty. It can be overridden in 
subclasses if needed.
+  }
+
+  protected void cacheLoadInc(TableIdentifier tid) {
+    // This method is intentionally left empty. It can be overridden in 
subclasses if needed.
+  }
+
+  protected void cacheHitInc(TableIdentifier tid) {
+    // This method is intentionally left empty. It can be overridden in 
subclasses if needed.
+  }
+
+  protected void cacheMissInc(TableIdentifier tid) {
+    // This method is intentionally left empty. It can be overridden in 
subclasses if needed.
+  }
+
+  protected void cacheMetaLoadInc(TableIdentifier tid) {
+    // This method is intentionally left empty. It can be overridden in 
subclasses if needed.
+  }
+
+  /**
+   * Gets the metadata file location of a table.
+   *
+   * @param table the table
+   * @return the location of the metadata file, or null if the table does not 
have a location
+   */
+  protected static String getMetadataLocation(final Table table) {
+    if (table instanceof HasTableOperations tableOps) {
+      final TableOperations ops = tableOps.operations();
+      final TableMetadata meta;
+      if (ops != null && (meta = ops.current()) != null) {

Review Comment:
   it can't be null, check iceberg code. I don't think we need method for that
   ````
   if (table instanceof HasTableOperations tableOp) {
     metadataLocation = tableOp.operations().current().metadataFileLocation();
   }
   ````
   



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