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_r333148519
##########
File path: core/src/main/java/org/apache/iceberg/avro/PruneColumns.java
##########
@@ -171,14 +241,19 @@ private static Schema copyRecord(Schema record,
List<Schema.Field> newFields) {
return copy;
}
- private static Schema.Field copyField(Schema.Field field, Schema newSchema) {
+ private static Schema.Field copyField(Schema.Field field, Schema newSchema,
Integer fieldId) {
Schema.Field copy = new Schema.Field(field.name(),
newSchema, field.doc(), field.defaultVal(), field.order());
for (Map.Entry<String, Object> prop : field.getObjectProps().entrySet()) {
copy.addProp(prop.getKey(), prop.getValue());
}
+ if (!AvroSchemaUtil.hasFieldId(field)) {
Review comment:
Should this validate that the ID is the same if it is present?
----------------------------------------------------------------
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]