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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to