Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public static Schema convertToSchema(LogicalType schema) {
/**
* Converts Flink SQL {@link LogicalType} (can be nested) into an Avro schema.
*
* <p>The "{rowName}_" is used as the nested row type name prefix in order to generate the right
* <p>The "{rowName}." is used as the nested row type name prefix in order to generate the right
* schema. Nested record type that only differs with type name is still compatible.
*
* @param logicalType logical type
Expand Down Expand Up @@ -263,7 +263,7 @@ public static Schema convertToSchema(LogicalType logicalType, String rowName) {
LogicalType fieldType = rowType.getTypeAt(i);
SchemaBuilder.GenericDefault<Schema> fieldBuilder =
builder.name(fieldName)
.type(convertToSchema(fieldType, rowName + "_" + fieldName));
.type(convertToSchema(fieldType, rowName + "." + fieldName));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment in line 174 should also be tweaked.


if (fieldType.isNullable()) {
builder = fieldBuilder.withDefault(null);
Expand Down