rdsr commented on a change in pull request #1208:
URL: https://github.com/apache/iceberg/pull/1208#discussion_r460356094
##########
File path: orc/src/main/java/org/apache/iceberg/orc/OrcIterable.java
##########
@@ -51,14 +54,16 @@
private final boolean caseSensitive;
private final Function<TypeDescription, OrcBatchReader<?>>
batchReaderFunction;
private final int recordsPerBatch;
+ private final NameMapping nameMapping;
OrcIterable(InputFile file, Configuration config, Schema schema,
- Long start, Long length,
+ NameMapping nameMapping, Long start, Long length,
Function<TypeDescription, OrcRowReader<?>> readerFunction,
boolean caseSensitive, Expression filter,
Function<TypeDescription, OrcBatchReader<?>>
batchReaderFunction, int recordsPerBatch) {
this.schema = schema;
this.readerFunction = readerFunction;
this.file = file;
+ this.nameMapping =
Optional.ofNullable(nameMapping).orElse(MappingUtil.create(schema));
Review comment:
Should we also check if the file schema does not have ids before
initializing nameMapping?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]