Guosmilesmile commented on code in PR #15776:
URL: https://github.com/apache/iceberg/pull/15776#discussion_r3180932578
##########
orc/src/main/java/org/apache/iceberg/orc/OrcValueReaders.java:
##########
@@ -163,6 +177,121 @@ protected StructReader(
}
}
+ protected StructReader(
+ TypeDescription orcType,
+ List<OrcValueReader<?>> readers,
+ Types.StructType struct,
+ Map<Integer, ?> idToConstant) {
+ List<Types.NestedField> fields = struct.fields();
+ this.readers = new OrcValueReader[fields.size()];
+ this.isConstantOrMetadataField = new boolean[fields.size()];
+ this.fieldVectorIndex = new int[fields.size()];
+
+ Map<Integer, OrcValueReader<?>> readersById = readersByFieldId(orcType,
readers);
+ Map<Integer, Integer> fieldIdToVectorIndex =
buildFieldIdToVectorIndex(orcType);
+
+ for (int pos = 0; pos < fields.size(); pos += 1) {
+ Types.NestedField field = fields.get(pos);
+ OrcValueReader<?> fileReader = readersById.get(field.fieldId());
+
+ if (field.equals(MetadataColumns.ROW_ID)) {
+ handleRowIdField(pos, field, fileReader, idToConstant,
fieldIdToVectorIndex);
Review Comment:
Rename fieldIdToVectorIndex to fieldIdToDataIndex, then pushdown dataIndex
into method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]