private StringConverter createNotNullConverter(LogicalType type) {
        switch (type.getTypeRoot()) {
            case NULL:
                return new StringConverter() {

                    private static final long serialVersionUID = 1L;

                    @Override
                    public String convert(Object dbzObj, Schema schema) throws Exception {
                        return null;
                    }
                };
            case BOOLEAN:
            case TINYINT:
            case SMALLINT:
            case INTEGER:
            case INTERVAL_YEAR_MONTH:
            case BIGINT:
            case INTERVAL_DAY_TIME:
                return toStringConverter;
            case DATE:
                return createDateConverter();
            case TIME_WITHOUT_TIME_ZONE:
                return createTimeConverter();
            case TIMESTAMP_WITHOUT_TIME_ZONE:
                return createTimestampConverter();
            case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
                return createLocalTimeZoneTimestampConverter();
            case FLOAT:
            case DOUBLE:
            case CHAR:
            case VARCHAR:
                return toStringConverter;
            case BINARY:
            case VARBINARY:
                return createBinaryConverter();
            case DECIMAL:
                return createDecimalConverter((DecimalType) type);
            case ROW:
            case ARRAY:
            case MAP:
            case MULTISET:
            case RAW:
            default:
                throw new UnsupportedOperationException("Unsupported type: " + type);
        }
    }
Formatter for SQL string representation of a timestamp value (with UTC timezone).
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/mysql/table/OldFieldMetadataConverter.java