You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/08/28 08:04:18 UTC

[GitHub] [iceberg] chenjunjiedada commented on issue #1396: Cannot read Parquet maps with NameMapping

chenjunjiedada commented on issue #1396:
URL: https://github.com/apache/iceberg/issues/1396#issuecomment-682388898


   I don't see current name mapping logic about updating the field name.  Neither `map` nor `primitive`. Could you help to construct a unit test to reproduce it?
   
   ```java
     @Override
     public Type map(GroupType map, Type keyType, Type valueType) {
       Preconditions.checkArgument(keyType != null && valueType != null,
           "Map type must have both key field and value field");
   
       MappedField field = nameMapping.find(currentPath());
       Type mapType = org.apache.parquet.schema.Types.map(map.getRepetition())
           .key(keyType)
           .value(valueType)
           .named(map.getName());
   
       return field == null ? mapType : mapType.withId(field.id());
     }
   
     @Override
     public Type primitive(PrimitiveType primitive) {
       MappedField field = nameMapping.find(currentPath());
       return field == null ? primitive : primitive.withId(field.id());
     }
   ```


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org