You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jc...@apache.org on 2019/11/20 21:00:19 UTC

[hive] branch branch-1.2 updated: HIVE-22480: IndexOutOfBounds exception while reading ORC files written with empty positions list in first row index entry (Jesus Camacho Rodriguez, reviewed by Prasanth Jayachandran)

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

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


View the commit online:
https://github.com/apache/hive/commit/6002c510113d9a6aa87159c7386f2a8a4747405b

The following commit(s) were added to refs/heads/branch-1.2 by this push:
     new 6002c51  HIVE-22480: IndexOutOfBounds exception while reading ORC files written with empty positions list in first row index entry (Jesus Camacho Rodriguez, reviewed by Prasanth Jayachandran)
6002c51 is described below

commit 6002c510113d9a6aa87159c7386f2a8a4747405b
Author: Jesus Camacho Rodriguez <jc...@apache.org>
AuthorDate: Wed Nov 20 12:55:15 2019 -0800

    HIVE-22480: IndexOutOfBounds exception while reading ORC files written with empty positions list in first row index entry (Jesus Camacho Rodriguez, reviewed by Prasanth Jayachandran)
---
 ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderUtils.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderUtils.java
index ded3979..8af836f 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderUtils.java
@@ -87,7 +87,7 @@ public class RecordReaderUtils {
       if (!includedRowGroups[group]) continue;
       int posn = getIndexPosition(
           encoding.getKind(), type.getKind(), stream.getKind(), isCompressed, hasNull);
-      long start = index.getEntry(group).getPositions(posn);
+      long start = group == 0 ? 0 : index.getEntry(group).getPositions(posn);
       final long nextGroupOffset;
       boolean isLast = group == (includedRowGroups.length - 1);
       nextGroupOffset = isLast ? length : index.getEntry(group + 1).getPositions(posn);