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

sankarh pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/branch-3 by this push:
     new 44792af7d20 HIVE-27570: Backport of HIVE-21815: Stats in ORC file are 
parsed twice (Krisztian Kasa, reviewed by Gopal V)
44792af7d20 is described below

commit 44792af7d204d2da9573b43d46ee61bb4055d14a
Author: Shefali Singh <31477542+shefali...@users.noreply.github.com>
AuthorDate: Mon Aug 21 11:47:51 2023 +0530

    HIVE-27570: Backport of HIVE-21815: Stats in ORC file are parsed twice 
(Krisztian Kasa, reviewed by Gopal V)
    
    Signed-off-by: Sankar Hariappan <sank...@apache.org>
    Closes (#4553)
---
 ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java 
b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
index 73c2dcce2c6..f2f93e07322 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java
@@ -1653,9 +1653,12 @@ public class OrcInputFormat implements 
InputFormat<NullWritable, OrcStruct>,
         if (context.cacheStripeDetails) {
           context.footerCache.put(new FooterCacheKey(fsFileId, 
file.getPath()), orcTail);
         }
+        stripes = orcReader.getStripes();
+        stripeStats = orcReader.getStripeStatistics();
+      } else {
+        stripes = orcTail.getStripes();
+        stripeStats = orcTail.getStripeStatistics();
       }
-      stripes = orcTail.getStripes();
-      stripeStats = orcTail.getStripeStatistics();
       fileTypes = orcTail.getTypes();
       TypeDescription fileSchema = OrcUtils.convertTypeFromProtobuf(fileTypes, 
0);
       Reader.Options readerOptions = new Reader.Options(context.conf);

Reply via email to