public static <T, R> List<T> subtract(List<T> minuend, List<T> subtrahend, Function<T, R> keyExtractor) {
        if (CollectionUtils.isEmpty(subtrahend) || CollectionUtils.isEmpty(minuend)) {
            return minuend;
        }

        Map<R, T> minuMap = toMap(minuend, keyExtractor);
        Map<R, T> substraMap = toMap(subtrahend, keyExtractor);
        substraMap.forEach((k, v) -> minuMap.remove(k));
        return new ArrayList<>(minuMap.values());
    }
Return a list that elements in list1 but not in list2 by a specified key
@param minuend list to subtract from
@param subtrahend list to subtract
@param keyExtractor Key extract function
@return List of elements in list1 but not in list 2 by a specified key
@param <T> Element type
@param <R> Key type
inlong-common/src/main/java/org/apache/inlong/common/util/ListUtil.java