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:01:09 UTC
[hive] branch branch-2.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-2.2
in repository https://gitbox.apache.org/repos/asf/hive.git
View the commit online:
https://github.com/apache/hive/commit/67f9139f07942e96bfa8324e5b8fb7b64ff40c0f
The following commit(s) were added to refs/heads/branch-2.2 by this push:
new 67f9139 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)
67f9139 is described below
commit 67f9139f07942e96bfa8324e5b8fb7b64ff40c0f
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/hive/orc/impl/RecordReaderUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/orc/src/java/org/apache/hive/orc/impl/RecordReaderUtils.java b/orc/src/java/org/apache/hive/orc/impl/RecordReaderUtils.java
index 16af69d..4f9a0fb 100644
--- a/orc/src/java/org/apache/hive/orc/impl/RecordReaderUtils.java
+++ b/orc/src/java/org/apache/hive/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);