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/11/06 18:45:38 UTC

[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #618: Fix for 'Error reading Avro files containing array of struct with 2 fields #605'

rdblue commented on a change in pull request #618: Fix for 'Error reading Avro files containing array of struct with 2 fields #605'
URL: https://github.com/apache/incubator-iceberg/pull/618#discussion_r343263875
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/avro/AvroSchemaVisitor.java
 ##########
 @@ -58,7 +58,7 @@
         return visitor.union(schema, options);
 
       case ARRAY:
-        if (schema.getLogicalType() instanceof LogicalMap || AvroSchemaUtil.isKeyValueSchema(schema.getElementType())) {
+        if (schema.getLogicalType() instanceof LogicalMap && AvroSchemaUtil.isKeyValueSchema(schema.getElementType())) {
 
 Review comment:
   I think the solution should be a better check in `isKeyValueSchema`. If the logical type is `LogicalMap`, then it should not need additional requirements for the element type.

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