danny0405 commented on a change in pull request #13763: URL: https://github.com/apache/flink/pull/13763#discussion_r513162229
########## File path: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java ########## @@ -297,32 +300,53 @@ private static DataType convertToDataType(Schema schema) { * @return Avro's {@link Schema} matching this logical type. */ public static Schema convertToSchema(LogicalType logicalType) { + // If it is parsing the root row type, switches from nullable true to false + // because a nullable row type is meaningless and would generate wrong schema. + if (logicalType.getTypeRoot() == LogicalTypeRoot.ROW Review comment: Although the `AvroSchemaConverter` is a tool class, it is still used as a public API, so i'm inclined to keep the signature unchanged. Another reason is that only logical type is enough for the conversion. Have added more documents to the methods. ---------------------------------------------------------------- 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