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 2019/10/27 22:48:06 UTC

[GitHub] [incubator-iceberg] rdsr commented on a change in pull request #580: Infer mapping from expected schema if file schema does not have field-ids and name mapping is missing

rdsr commented on a change in pull request #580: Infer mapping from expected schema if file schema does not have field-ids and name mapping is missing
URL: https://github.com/apache/incubator-iceberg/pull/580#discussion_r339368735
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/avro/ProjectionDatumReader.java
 ##########
 @@ -51,6 +52,10 @@ public ProjectionDatumReader(Function<Schema, DatumReader<?>> getReader,
   @Override
   public void setSchema(Schema newFileSchema) {
     this.fileSchema = newFileSchema;
+    boolean hasIds = AvroSchemaUtil.hasIds(fileSchema);
+    if (!hasIds && nameMapping == null) {
 
 Review comment:
   nice catch!

----------------------------------------------------------------
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


With regards,
Apache Git Services

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