rdblue commented on a change in pull request #207: Add external schema mappings
for files written with name-based schemas #40
URL: https://github.com/apache/incubator-iceberg/pull/207#discussion_r331300461
##########
File path: core/src/main/java/org/apache/iceberg/avro/PruneColumns.java
##########
@@ -138,28 +166,98 @@ public Schema array(Schema array, Schema element) {
@Override
public Schema map(Schema map, Schema value) {
- int keyId = AvroSchemaUtil.getKeyId(map);
- int valueId = AvroSchemaUtil.getValueId(map);
+ Integer keyId = id(map, AvroSchemaUtil.KEY_ID_PROP, "key");
+ Integer valueId = id(map, AvroSchemaUtil.VALUE_ID_PROP, "value");
Review comment:
I think the approach of adding a NameMapping lookup to the original
`AvroSchemaUtil` methods would be a bit cleaner. What do you think?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]