rdblue commented on a change in pull request #3774:
URL: https://github.com/apache/iceberg/pull/3774#discussion_r791316930
##########
File path:
parquet/src/main/java/org/apache/iceberg/parquet/ApplyNameMapping.java
##########
@@ -67,11 +67,17 @@ public Type list(GroupType list, Type elementType) {
Preconditions.checkArgument(elementType != null,
"List type must have element field");
+ boolean isOldListElementType =
ParquetSchemaUtil.isOldListElementType(list);
MappedField field = nameMapping.find(currentPath());
- Type listType = Types.buildGroup(list.getRepetition())
- .as(LogicalTypeAnnotation.listType())
- .repeatedGroup().addFields(elementType).named(list.getFieldName(0))
- .named(list.getName());
+
+ Types.GroupBuilder<GroupType> listBuilder =
Types.buildGroup(list.getRepetition())
+ .as(LogicalTypeAnnotation.listType());
+ if (isOldListElementType) {
Review comment:
I think this can check whether the repetition level of the element is
`REPEATED` to determine whether it is a 2-level list. I think that would be
better than allowing the `isOldListElementType` check in multiple places.
--
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]