rdblue commented on a change in pull request #830: Support name mapping resolution for parquet URL: https://github.com/apache/incubator-iceberg/pull/830#discussion_r406851052
########## File path: parquet/src/main/java/org/apache/iceberg/parquet/ReadConf.java ########## @@ -66,19 +63,27 @@ @SuppressWarnings("unchecked") ReadConf(InputFile file, ParquetReadOptions options, Schema expectedSchema, Expression filter, Function<MessageType, ParquetValueReader<?>> readerFunc, Function<MessageType, - VectorizedReader<?>> batchedReaderFunc, boolean reuseContainers, + VectorizedReader<?>> batchedReaderFunc, NameMapping nameMapping, boolean reuseContainers, boolean caseSensitive, Integer bSize) { this.file = file; this.options = options; this.reader = newReader(file, options); MessageType fileSchema = reader.getFileMetaData().getSchema(); - boolean hasIds = ParquetSchemaUtil.hasIds(fileSchema); - MessageType typeWithIds = hasIds ? fileSchema : ParquetSchemaUtil.addFallbackIds(fileSchema); + MessageType typeWithIds; Review comment: Like above, let's pass `nameMapping` to `addFallbackIds` and have that choose whether to assign using the mapping or by position. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org