private static long getIntervalEnd(GtidSet.UUIDSet uuidSet) {
        return uuidSet.getIntervals().stream()
                .mapToLong(GtidSet.Interval::getEnd)
                .max()
                .getAsLong();
    }
This method merges one GTID set (toMerge) into another (base), without overwriting the
existing elements in the base GTID set.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/mysql-cdc/src/main/java/io/debezium/connector/mysql/GtidUtils.java