You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/07/25 03:02:51 UTC

[GitHub] [iceberg] rdsr commented on a change in pull request #1208: ORC: Add name mapping support

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org