Source:
<code>private Type convertField(String fieldName, Schema schema, Type.Repetition repetition) { Schema.Type type = schema.getType(); if (type.equals(Schema.Type.BOOLEAN)) { return primitive(fieldName, BOOLEAN, repetition); } else if (type.equals(Schema.Type.INT)) { return primitive(fieldName, INT32, repetition); } else if (type.equals(Schema.Type.LONG)) { return primitive(fieldName, INT64, repetition); } else if (type.equals(Schema.Type.FLOAT)) { return primitive(fieldName, FLOAT, repetition); } else if (type.equals(Schema.Type.DOUBLE)) { return primitive(fieldName, DOUBLE, repetition); } else if (type.equals(Schema.Type.BYTES)) { return primitive(fieldName, BINARY, repetition); } else if (type.equals(Schema.Type.STRING)) { return primitive(fieldName, BINARY, repetition, UTF8); } else if (type.equals(Schema.Type.RECORD)) { return new GroupType(repetition, fieldName, convertFields(schema.getFields())); } else if (type.equals(Schema.Type.ENUM)) { return primitive(fieldName, BINARY, repetition, ENUM); } else if (type.equals(Schema.Type.ARRAY)) { return new GroupType(repetition,fieldName,OriginalType.LIST, <START> new GroupType(Type.Repetition.REPEATED, "bag", convertField("array_element", schema.getElementType(), Type.Repetition.OPTIONAL))); <END> } else if (type.equals(Schema.Type.MAP)) { Type valType = convertField("value", schema.getValueType()); return ConversionPatterns.stringKeyMapType(repetition, fieldName, valType); } else if (type.equals(Schema.Type.FIXED)) { return primitive(fieldName, FIXED_LEN_BYTE_ARRAY, repetition, schema.getFixedSize(), null); } else if (type.equals(Schema.Type.UNION)) { return convertUnion(fieldName, schema, repetition); } throw new UnsupportedOperationException("Cannot convert Avro type " + type); }</code><technical_language>This continue ConversionPatterns in general move instantiating groups primitive types directly. Types for cases</technical_language>

Target:
private Type convertField(String fieldName, Schema schema, Type.Repetition repetition) { Schema.Type type = schema.getType(); if (type.equals(Schema.Type.BOOLEAN)) { return primitive(fieldName, BOOLEAN, repetition); } else if (type.equals(Schema.Type.INT)) { return primitive(fieldName, INT32, repetition); } else if (type.equals(Schema.Type.LONG)) { return primitive(fieldName, INT64, repetition); } else if (type.equals(Schema.Type.FLOAT)) { return primitive(fieldName, FLOAT, repetition); } else if (type.equals(Schema.Type.DOUBLE)) { return primitive(fieldName, DOUBLE, repetition); } else if (type.equals(Schema.Type.BYTES)) { return primitive(fieldName, BINARY, repetition); } else if (type.equals(Schema.Type.STRING)) { return primitive(fieldName, BINARY, repetition, UTF8); } else if (type.equals(Schema.Type.RECORD)) { return new GroupType(repetition, fieldName, convertFields(schema.getFields())); } else if (type.equals(Schema.Type.ENUM)) { return primitive(fieldName, BINARY, repetition, ENUM); } else if (type.equals(Schema.Type.ARRAY)) { return ConversionPatterns.listType(repetition, fieldName, Types.repeatedGroup().addField(convertField("array_element", schema.getElementType(), Type.Repetition.OPTIONAL)).named("bag")); } else if (type.equals(Schema.Type.MAP)) { Type valType = convertField("value", schema.getValueType()); return ConversionPatterns.stringKeyMapType(repetition, fieldName, valType); } else if (type.equals(Schema.Type.FIXED)) { return primitive(fieldName, FIXED_LEN_BYTE_ARRAY, repetition, schema.getFixedSize(), null); } else if (type.equals(Schema.Type.UNION)) { return convertUnion(fieldName, schema, repetition); } throw new UnsupportedOperationException("Cannot convert Avro type " + type); }