public static boolean splitKeyRangeContains(
            Object[] key, Object[] splitKeyStart, Object[] splitKeyEnd) {
        // for all range
        if (splitKeyStart == null && splitKeyEnd == null) {
            return true;
        }
        // first split
        if (splitKeyStart == null) {
            int[] upperBoundRes = new int[key.length];
            for (int i = 0; i < key.length; i++) {
                upperBoundRes[i] = compareObjects(key[i], splitKeyEnd[i]);
            }
            return Arrays.stream(upperBoundRes).anyMatch(value -> value < 0)
                    && Arrays.stream(upperBoundRes).allMatch(value -> value <= 0);
        }
        // last split
        else if (splitKeyEnd == null) {
            int[] lowerBoundRes = new int[key.length];
            for (int i = 0; i < key.length; i++) {
                lowerBoundRes[i] = compareObjects(key[i], splitKeyStart[i]);
            }
            return Arrays.stream(lowerBoundRes).allMatch(value -> value >= 0);
        }
        // other split
        else {
            int[] lowerBoundRes = new int[key.length];
            int[] upperBoundRes = new int[key.length];
            for (int i = 0; i < key.length; i++) {
                lowerBoundRes[i] = compareObjects(key[i], splitKeyStart[i]);
                upperBoundRes[i] = compareObjects(key[i], splitKeyEnd[i]);
            }
            return Arrays.stream(lowerBoundRes).anyMatch(value -> value >= 0)
                    && (Arrays.stream(upperBoundRes).anyMatch(value -> value < 0)
                            && Arrays.stream(upperBoundRes).allMatch(value -> value <= 0));
        }
    }
@Test
    public void testSplitKeyRangeContains() {
        // table with only one split
        assertKeyRangeContains(new Object[] {100L}, null, null);
        // the last split
        assertKeyRangeContains(new Object[] {101L}, new Object[] {100L}, null);

        // the first split
        assertKeyRangeContains(new Object[] {101L}, null, new Object[] {1024L});

        // general splits
        assertKeyRangeContains(new Object[] {100L}, new Object[] {1L}, new Object[] {1024L});
        assertFalse(
                splitKeyRangeContains(new Object[] {0L}, new Object[] {1L}, new Object[] {1024L}));

        // split key from binlog may have different type
        assertKeyRangeContains(
                new Object[] {BigInteger.valueOf(100L)}, new Object[] {1L}, new Object[] {1024L});
        assertFalse(
                splitKeyRangeContains(
                        new Object[] {BigInteger.valueOf(0L)},
                        new Object[] {1L},
                        new Object[] {1024L}));
    }