public static <T, R, N extends Comparable<? super N>> List<T> batchCheckLatestRecursive(
            List<T> last, List<T> current,
            Function<T, R> keyExtractor,
            BiFunction<T, T, T> singleCheckLatestFunction) {
        if (CollectionUtils.isEmpty(last)) {
            return current;
        }
        if (CollectionUtils.isEmpty(current)) {
            return null;
        }

        List<T> newByKey = checkNew(current, last, keyExtractor);
        List<T> latestInner = batchCheckRecursive(last, current, keyExtractor, singleCheckLatestFunction);
        return ListUtil.union(latestInner, newByKey);
    }
Batch check and return a list of new elements by given delete check function
@param last Elements of last check
@param current Elements of current
@param keyExtractor Key extractor of elements
@param innerCheckNewFunction The single element new check function
@return A list of new elements
@param <T> Element type
@param <R> Key type
inlong-common/src/main/java/org/apache/inlong/common/util/SortConfigUtil.java