diff --git ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java index 3f4f64e..e8b3489 100644 --- ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java +++ ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java @@ -179,11 +179,11 @@ Object next(Object previous) throws IOException { * @throws IOException */ Object nextVector(Object previousVector, long batchSize) throws IOException { - if (present != null) { + ColumnVector result = (ColumnVector) previousVector; + if (present != null) { // Set noNulls and isNull vector of the ColumnVector based on // present stream - ColumnVector result = (ColumnVector) previousVector; result.noNulls = true; for (int i = 0; i < batchSize; i++) { result.isNull[i] = (present.next() != 1); @@ -191,6 +191,13 @@ Object nextVector(Object previousVector, long batchSize) throws IOException { result.noNulls = false; } } + } else { + // There is not present stream, this means that all the values are + // present. + result.noNulls = true; + for (int i = 0; i < batchSize; i++) { + result.isNull[i] = false; + } } return previousVector; }