private static DataType convertToRowType(RowTypeInfo rowTypeInfo) {
        final String[] fieldNames = rowTypeInfo.getFieldNames();
        final DataTypes.Field[] fields = IntStream.range(0, rowTypeInfo.getArity())
                .mapToObj(i -> {
                    DataType fieldType = toDataType(rowTypeInfo.getTypeAt(i));

                    return DataTypes.FIELD(
                            fieldNames[i],
                            fieldType);
                })
                .toArray(DataTypes.Field[]::new);

        return DataTypes.ROW(fields).bridgedTo(Row.class);
    }
Converter between {@link TypeInformation} and {@link DataType} that reflects the behavior before
Flink 1.9. The conversion is a 1:1 mapping that allows back-and-forth conversion. Note that nullability
constraints might get lost during the back-and-forth conversion.

<p>This converter only exists to still support deprecated methods that take or return {@link TypeInformation}.
Some methods will still support type information in the future, however, the future type information
support will integrate nicer with the new type stack.

<p>This converter reflects the old behavior that includes:

<ul>
  <li>Use old {@code java.sql.*} time classes for time data types.</li>

  <li>Only support millisecond precision for timestamps or day-time intervals.</li>

  <li>Let variable precision and scale for decimal types pass through the planner.</li>

  <li>Inconsistent nullability. Most types are nullable even though type information does not support it.</li>

  <li>Distinction between {@link BasicArrayTypeInfo} and {@link ObjectArrayTypeInfo}.</li>

  <li>Let POJOs, case classes, and tuples pass through the planner.</li>
</ul>

<p>Any changes here need to be applied to the legacy planner as well.
core/src/main/java/com/dtstack/flink/sql/util/TypeInfoDataTypeConverter.java