private static RowFormatInfo getValidatedRowFormatInfo(
            DescriptorProperties descriptorProperties) {
        RowFormatInfo rowFormatInfo = getRowFormatInfo(descriptorProperties);

        String[] fieldNames = rowFormatInfo.getFieldNames();
        FormatInfo[] fieldFormatInfos = rowFormatInfo.getFieldFormatInfos();
        for (int i = 0; i < fieldNames.length; ++i) {
            String fieldName = fieldNames[i];
            FormatInfo fieldFormatInfo = fieldFormatInfos[i];

            if (!(fieldFormatInfo instanceof BasicFormatInfo)) {
                throw new ValidationException("The format for field " + fieldName + " is " +
                        fieldFormatInfo.getClass().getSimpleName() + ". Only basic formats are " +
                        "supported in csv.");
            }
        }

        return rowFormatInfo;
    }
Table format factory for providing configured instances of CSV-to-row
serializer and deserializer.
inlong-sort/sort-formats/format-row/format-csv/src/main/java/org/apache/inlong/sort/formats/csv/CsvFormatFactory.java