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:55:47 UTC

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


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

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

commit d377783f2607e06a01579ade7c83cff39a17b0f1
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 9c9a1c0..501e3f4 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);