private static Optional<DeserializationRuntimeConverter> createLongConverter() {
        return Optional.of(
                new DeserializationRuntimeConverter() {

                    private static final long serialVersionUID = 1L;

                    @Override
                    public Object convert(Object dbzObj, Schema schema) {
                        if (dbzObj instanceof Integer) {
                            return ((Integer) dbzObj).longValue();
                        } else if (dbzObj instanceof Long) {
                            return dbzObj;
                        } else if (dbzObj instanceof BigDecimal) {
                            return ((BigDecimal) dbzObj).longValue();
                        } else {
                            return Long.parseLong(dbzObj.toString());
                        }
                    }
                });
    }
Creates a runtime converter which assuming input object is not null.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/postgres-cdc/src/main/java/org/apache/inlong/sort/cdc/postgres/table/PostgreSQLDeserializationConverterFactory.java