hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1503883 - /hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
Date Tue, 16 Jul 2013 20:57:52 GMT
Author: hashutosh
Date: Tue Jul 16 20:57:51 2013
New Revision: 1503883

URL: http://svn.apache.org/r1503883
Log:
HIVE-4769 : Vectorized ORC reader does not handle absence of column present stream correctly.
(Sarvesh Sakalanaga via Ashutosh Chauhan)

Modified:
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java?rev=1503883&r1=1503882&r2=1503883&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
(original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
Tue Jul 16 20:57:51 2013
@@ -179,11 +179,11 @@ class RecordReaderImpl implements Record
      * @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 @@ class RecordReaderImpl implements Record
             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;
     }



Mime
View raw message