You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ay...@apache.org on 2023/06/20 04:18:38 UTC

[hive] branch master updated: HIVE-27447: Iceberg: Queries failing due to FileSystem close errors due to column statistics. (#4429). (Ayush Saxena, reviewed by Denys Kuzmenko,)

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

ayushsaxena pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 0865ca7a10f HIVE-27447: Iceberg: Queries failing due to FileSystem close errors due to column statistics. (#4429). (Ayush Saxena, reviewed by Denys Kuzmenko,)
0865ca7a10f is described below

commit 0865ca7a10f73c8b32ed1b0755386f46d7a6a686
Author: Ayush Saxena <ay...@apache.org>
AuthorDate: Tue Jun 20 09:48:31 2023 +0530

    HIVE-27447: Iceberg: Queries failing due to FileSystem close errors due to column statistics. (#4429). (Ayush Saxena, reviewed by Denys Kuzmenko,)
---
 .../org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java
index 375a6d21f10..d6abacf4c67 100644
--- a/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java
+++ b/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java
@@ -439,7 +439,8 @@ public class HiveIcebergStorageHandler implements HiveStoragePredicateHandler, H
     Table table = IcebergTableUtil.getTable(conf, hmsTable.getTTable());
     if (canSetColStatistics(hmsTable)) {
       Path statsPath = getStatsPath(table);
-      try (FileSystem fs = statsPath.getFileSystem(conf)) {
+      try {
+        FileSystem fs = statsPath.getFileSystem(conf);
         if (fs.exists(statsPath)) {
           return true;
         }
@@ -496,12 +497,13 @@ public class HiveIcebergStorageHandler implements HiveStoragePredicateHandler, H
   }
 
   private void invalidateStats(Path statsPath) {
-    try (FileSystem fs = statsPath.getFileSystem(conf)) {
+    try {
+      FileSystem fs = statsPath.getFileSystem(conf);
       if (fs.exists(statsPath)) {
         fs.delete(statsPath, true);
       }
     } catch (IOException e) {
-      LOG.error("Failed to invalidate stale column stats: {}", e);
+      LOG.error("Failed to invalidate stale column stats: {}", e.getMessage());
     }
   }