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: [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]