HIVE-14483 : java.lang.ArrayIndexOutOfBoundsException org.apache.orc.impl.TreeReaderFactory.commonReadByteArrays (Sergey Zadoroshnyak, reviewed by Sergey Shelukhin)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/3965fc0f Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/3965fc0f Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/3965fc0f Branch: refs/heads/branch-2.1 Commit: 3965fc0f503087f6fbb7cc8259fb5ba36a212f1d Parents: b1188b4 Author: Sergey Shelukhin <[email protected]> Authored: Mon Aug 15 13:55:16 2016 -0700 Committer: Sergey Shelukhin <[email protected]> Committed: Mon Aug 15 13:55:56 2016 -0700 ---------------------------------------------------------------------- orc/src/java/org/apache/orc/impl/TreeReaderFactory.java | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/3965fc0f/orc/src/java/org/apache/orc/impl/TreeReaderFactory.java ---------------------------------------------------------------------- diff --git a/orc/src/java/org/apache/orc/impl/TreeReaderFactory.java b/orc/src/java/org/apache/orc/impl/TreeReaderFactory.java index 5901c8c..5fdf60a 100644 --- a/orc/src/java/org/apache/orc/impl/TreeReaderFactory.java +++ b/orc/src/java/org/apache/orc/impl/TreeReaderFactory.java @@ -1228,6 +1228,7 @@ public class TreeReaderFactory { BytesColumnVector result, final int batchSize) throws IOException { // Read lengths scratchlcv.isNull = result.isNull; // Notice we are replacing the isNull vector here... + scratchlcv.ensureSize(batchSize, false); lengths.nextVector(scratchlcv, scratchlcv.vector, batchSize); int totalLength = 0; if (!scratchlcv.isRepeating) {
