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_r326876937
##########
File path: core/src/main/java/org/apache/iceberg/avro/BuildAvroProjection.java
##########
@@ -166,17 +184,28 @@ public Schema array(Schema array, Supplier<Schema>
element) {
Schema keyValueSchema = array.getElementType();
Schema.Field keyField = keyValueSchema.getFields().get(0);
Schema.Field valueField = keyValueSchema.getFields().get(1);
- Schema.Field valueProjection = element.get().getField("value");
+ Schema elementSchema = element.get();
+
+ if (fieldId(valueField) == null) {
Review comment:
What if the key field has no ID? In that case, I think it should also not be
possible to project the field.
----------------------------------------------------------------
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]