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 19:55:48 UTC

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

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

 ##########
 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:
   >>  If the logical type is LogicalMap, then it should not need additional requirements for the element type.
   
   I think that makes sense. In that case. Maybe I should just simplify the if condition to 
   ```f (schema.getLogicalType())```  and maybe make the `isKeyValueSchema` check as part of  a PreconditionCheck?

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