huaxiangsun commented on code in PR #12771: URL: https://github.com/apache/iceberg/pull/12771#discussion_r2083549046
########## parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java: ########## @@ -401,6 +405,22 @@ public <D> FileAppender<D> build() throws IOException { Preconditions.checkState(fileAADPrefix == null, "AAD prefix set with null encryption key"); } + Map<String, String> colNameToParquetPathMap = + type.getColumns().stream() + .filter(col -> col.getPrimitiveType().getId() != null) + .filter( + col -> { + int fieldId = col.getPrimitiveType().getId().intValue(); + return schema.findColumnName(fieldId) != null; + }) + .collect( + Collectors.toMap( + col -> { + int fieldId = col.getPrimitiveType().getId().intValue(); + return schema.findColumnName(fieldId); Review Comment: I refactored the code and uploaded a new patch, please take a look, thanks. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org