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

pvary 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 d85e24c  HIVE-25683: Close reader in AcidUtils.isRawFormatFile (Peter 
Vary reviewed by Adam Szita) (#2774)
d85e24c is described below

commit d85e24c038ba4de996e39e158fe4ea3bfcf7ff9f
Author: pvary <[email protected]>
AuthorDate: Tue Nov 9 22:02:09 2021 +0100

    HIVE-25683: Close reader in AcidUtils.isRawFormatFile (Peter Vary reviewed 
by Adam Szita) (#2774)
---
 ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java 
b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
index 1870f98..0034328 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
@@ -2496,8 +2496,7 @@ public class AcidUtils {
     }
 
     public static boolean isRawFormatFile(Path dataFile, FileSystem fs) throws 
IOException {
-      try {
-        Reader reader = OrcFile.createReader(dataFile, 
OrcFile.readerOptions(fs.getConf()));
+      try (Reader reader = OrcFile.createReader(dataFile, 
OrcFile.readerOptions(fs.getConf()))) {
         /*
           acid file would have schema like <op, owid, writerId, rowid, cwid, 
<f1, ... fn>> so could
           check it this way once/if OrcRecordUpdater.ACID_KEY_INDEX_NAME is 
removed

Reply via email to