This is an automated email from the ASF dual-hosted git repository.
jenniferdai pushed a commit to branch orc
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/orc by this push:
new 38792d8 Addressing comments
38792d8 is described below
commit 38792d893dd06148649f4f531c50c95860df9a9f
Author: Jennifer Dai <[email protected]>
AuthorDate: Thu Mar 21 14:13:42 2019 -0700
Addressing comments
---
.../java/org/apache/pinot/orc/data/readers/ORCRecordReader.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
a/pinot-orc/src/main/java/org/apache/pinot/orc/data/readers/ORCRecordReader.java
b/pinot-orc/src/main/java/org/apache/pinot/orc/data/readers/ORCRecordReader.java
index 3c4c586..0c1b2db 100644
---
a/pinot-orc/src/main/java/org/apache/pinot/orc/data/readers/ORCRecordReader.java
+++
b/pinot-orc/src/main/java/org/apache/pinot/orc/data/readers/ORCRecordReader.java
@@ -134,10 +134,8 @@ public class ORCRecordReader implements RecordReader {
LOGGER.warn("Skipping column {} because it is not in pinot schema",
currColumnName);
continue;
}
- int currColRowIndex = currColumn.getId();
- // Struct is top level, so the id of the struct is 0. However, the
children start from 1+, etc, so we need to
- // subtract one since the row batch we get has only children column
vectors
- ColumnVector vector = rowBatch.cols[currColRowIndex - 1];
+ // ORC will keep your columns in the same order as the schema provided
+ ColumnVector vector = rowBatch.cols[i];
// Previous value set to null, not used except to save allocation
memory in OrcMapredRecordReader
WritableComparable writableComparable =
OrcMapredRecordReader.nextValue(vector, 0, currColumn, null);
genericRow.putField(currColumnName, getBaseObject(writableComparable));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]