Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,19 @@ private InternalSchema toInternalSchema(
List<InternalField> subFields = new ArrayList<>(schema.getFields().size());
for (Schema.Field avroField : schema.getFields()) {
IdMapping idMapping = fieldNameToIdMapping.get(avroField.name());
String fieldDoc = avroField.doc();
if (fieldDoc == null) {
fieldDoc = avroField.getProp("comment");
}
InternalSchema subFieldSchema =
toInternalSchema(
avroField.schema(),
SchemaUtils.getFullyQualifiedPath(parentPath, avroField.name()),
getChildIdMap(idMapping));
Object defaultValue = getDefaultValue(avroField);
if (fieldDoc != null && subFieldSchema.getComment() == null) {
subFieldSchema = InternalSchema.builderFrom(subFieldSchema).comment(fieldDoc).build();
}
subFields.add(
InternalField.builder()
.parentPath(parentPath)
Expand Down