This is an automated email from the ASF dual-hosted git repository.

yuqi1129 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new ad1d688764 [#13994] refactor(catalog-hive): Remove the unused table 
close that closes the shared client pool (#13998)
ad1d688764 is described below

commit ad1d688764d361ea5e0d847902372c8cebd56517
Author: YangJie <[email protected]>
AuthorDate: Mon Oct 26 21:34:13 2026 -0400

    [#13994] refactor(catalog-hive): Remove the unused table close that closes 
the shared client pool (#13998)
    
    ### What changes were proposed in this pull request?
    
    Remove `HiveTableHandle.close()` and make `HiveTableOperations.close()`
    a no-op.
    
    ### Why are the changes needed?
    
    `HiveTableHandle.close()` closed the client pool shared by every table
    of the catalog. Nothing calls it or `HiveTableOperations.close()`; the
    pool is closed by `HiveCatalogOperations.close()`.
    
    Fix: #13994
    
    ### Does this PR introduce _any_ user-facing change?
    
    No behavior change. The public method `HiveTableHandle.close()` is
    removed; nothing in Gravitino calls it.
    
    ### How was this patch tested?
    
    No new test: the removed code is unreachable, so there is no behavior to
    pin.
    
    ---------
    
    Co-authored-by: Qi Yu <[email protected]>
---
 .../main/java/org/apache/gravitino/catalog/hive/HiveTableHandle.java  | 4 ----
 .../java/org/apache/gravitino/catalog/hive/HiveTableOperations.java   | 3 ++-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git 
a/catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveTableHandle.java
 
b/catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveTableHandle.java
index 20a78e1faf..9b217b38c1 100644
--- 
a/catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveTableHandle.java
+++ 
b/catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveTableHandle.java
@@ -66,10 +66,6 @@ public class HiveTableHandle extends BaseTable {
     return (SupportsPartitions) ops();
   }
 
-  public void close() {
-    clientPool.close();
-  }
-
   public String getTableType() {
     return properties.getOrDefault(TABLE_TYPE, "MANAGED_TABLE");
   }
diff --git 
a/catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveTableOperations.java
 
b/catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveTableOperations.java
index bf78f57f3e..6f34820fff 100644
--- 
a/catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveTableOperations.java
+++ 
b/catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveTableOperations.java
@@ -186,6 +186,7 @@ public class HiveTableOperations implements 
TableOperations, SupportsPartitions
 
   @Override
   public void close() throws IOException {
-    tableHandle.close();
+    // Intentional no-op: the client pool is shared by every table of the 
catalog and is closed by
+    // HiveCatalogOperations.close().
   }
 }

Reply via email to