public static FinishedSnapshotSplitInfo getSplitInfoByBinarySearch(
            List<FinishedSnapshotSplitInfo> splitInfos, Object[] target) {
        int left = 0;
        int right = splitInfos.size() - 1;

        while (left <= right) {
            int mid = left + (right - left) / 2;
            FinishedSnapshotSplitInfo splitInfo = splitInfos.get(mid);

            Object[] splitStart = splitInfo.getSplitStart();
            Object[] splitEnd = splitInfo.getSplitEnd();

            if (splitKeyRangeContains(target, splitStart, splitEnd)) {
                return splitInfo;
            } else if (splitStart != null && isLessThanUpperBoundary(target, splitStart)) {
                right = mid - 1;
            } else {
                left = mid + 1;
            }
        }

        return null;
    }
Returns a split which contain the specific key.

@param splitInfos split info list.
@param target the specific key.
@return A split which contain the specific key.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/mysql/source/utils/RecordUtils.java