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 20:58:19 UTC

[hive] branch branch-2.1 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-2.1
in repository https://gitbox.apache.org/repos/asf/hive.git


View the commit online:
https://github.com/apache/hive/commit/03599216cfc01fc464f1c9a4fa89e81c45327ea5

The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 0359921  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)
0359921 is described below

commit 03599216cfc01fc464f1c9a4fa89e81c45327ea5
Author: Jesus Camacho Rodriguez <jc...@apache.org>
AuthorDate: Wed Nov 20 12:58:08 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)
---
 orc/src/java/org/apache/orc/impl/RecordReaderUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/orc/src/java/org/apache/orc/impl/RecordReaderUtils.java b/orc/src/java/org/apache/orc/impl/RecordReaderUtils.java
index 1067957..40097a6 100644
--- a/orc/src/java/org/apache/orc/impl/RecordReaderUtils.java
+++ b/orc/src/java/org/apache/orc/impl/RecordReaderUtils.java
@@ -248,7 +248,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);