chenjunjiedada commented on a change in pull request #830: Support name mapping resolution for parquet URL: https://github.com/apache/incubator-iceberg/pull/830#discussion_r407066629
########## File path: parquet/src/main/java/org/apache/iceberg/parquet/ParquetTypeVisitor.java ########## @@ -34,9 +34,13 @@ protected Deque<String> fieldNames = Lists.newLinkedList(); public static <T> T visit(Type type, ParquetTypeVisitor<T> visitor) { + return visit(type, visitor, false); + } + + public static <T> T visit(Type type, ParquetTypeVisitor<T> visitor, Boolean ignoreRepeated) { Review comment: I add an extra parameter here because the field names built from the original `ParquetTypeVisitor` are different in name mapping. For example, if we have a field consists of a list of the map type like below: ``` optional(1, "list_of_maps",Types.ListType.ofOptional(2, Types.MapType.ofOptional(3, 4, Types.StringType.get(),Types.StringType.get()); ``` the field names of the map ke and value are `list_of_map.list.element.map.key` and `list_of_map.list.element.map.value`. While the names in name mapping are `list_of_map.element.key` and `list_of_map.element.value`. Since the `NameMapping` is used by Avro already, so I update `ParquetTypeVisitor` a bit to handle this. ---------------------------------------------------------------- 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