rdblue commented on a change in pull request #1046: URL: https://github.com/apache/incubator-iceberg/pull/1046#discussion_r428876705
########## File path: core/src/main/java/org/apache/iceberg/avro/TypeToSchema.java ########## @@ -112,7 +112,9 @@ public Schema struct(Types.StructType struct, List<Schema> fieldSchemas) { } recordSchema = Schema.createRecord(recordName, null, null, false, fields); - + if (struct.isUnionSchema()) { Review comment: Is there some reason why this needs to be a round-trip conversion? I think it should be fine to convert back to a record instead of a union schema. That's what we should be writing into a table with a schema converted from an Avro union schema anyway. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org