hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasan...@apache.org
Subject svn commit: r1672009 - /hive/branches/llap/llap-server/src/java/org/apache/hadoop/hive/llap/io/decode/OrcEncodedDataConsumer.java
Date Wed, 08 Apr 2015 06:44:07 GMT
Author: prasanthj
Date: Wed Apr  8 06:44:06 2015
New Revision: 1672009

URL: http://svn.apache.org/r1672009
Log:
HIVE-10258: LLAP: orc_llap test fails again (Prasanth Jayachandran)

Modified:
    hive/branches/llap/llap-server/src/java/org/apache/hadoop/hive/llap/io/decode/OrcEncodedDataConsumer.java

Modified: hive/branches/llap/llap-server/src/java/org/apache/hadoop/hive/llap/io/decode/OrcEncodedDataConsumer.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/llap-server/src/java/org/apache/hadoop/hive/llap/io/decode/OrcEncodedDataConsumer.java?rev=1672009&r1=1672008&r2=1672009&view=diff
==============================================================================
--- hive/branches/llap/llap-server/src/java/org/apache/hadoop/hive/llap/io/decode/OrcEncodedDataConsumer.java
(original)
+++ hive/branches/llap/llap-server/src/java/org/apache/hadoop/hive/llap/io/decode/OrcEncodedDataConsumer.java
Wed Apr  8 06:44:06 2015
@@ -84,6 +84,7 @@ public class OrcEncodedDataConsumer exte
       if (columnReaders == null || !sameStripe) {
         this.columnReaders = EncodedTreeReaderFactory.createEncodedTreeReader(numCols,
             fileMetadata.getTypes(), stripeMetadata.getEncodings(), batch, codec, skipCorrupt);
+        positionInStreams(columnReaders, batch, numCols, stripeMetadata);
       } else {
         repositionInStreams(this.columnReaders, batch, sameStripe, numCols, stripeMetadata);
       }
@@ -115,6 +116,18 @@ public class OrcEncodedDataConsumer exte
     }
   }
 
+  private void positionInStreams(EncodedTreeReaderFactory.TreeReader[] columnReaders,
+      EncodedColumnBatch<OrcBatchKey> batch, int numCols,
+      OrcStripeMetadata stripeMetadata) throws IOException {
+    for (int i = 0; i < numCols; i++) {
+      int columnIndex = batch.columnIxs[i];
+      int rowGroupIndex = batch.batchKey.rgIx;
+      OrcProto.RowIndex rowIndex = stripeMetadata.getRowIndexes()[columnIndex];
+      OrcProto.RowIndexEntry rowIndexEntry = rowIndex.getEntry(rowGroupIndex);
+      columnReaders[i].seek(new RecordReaderImpl.PositionProviderImpl(rowIndexEntry));
+    }
+  }
+
   private void repositionInStreams(EncodedTreeReaderFactory.TreeReader[] columnReaders,
       EncodedColumnBatch<OrcBatchKey> batch, boolean sameStripe, int numCols,
       OrcStripeMetadata stripeMetadata) throws IOException {



Mime
View raw message