public static Map<String, Set<String>> getIntersectedPartitions(Map<String, Range<PartitionKey>> srcRangeMap,
                                                                    Map<String, Range<PartitionKey>> dstRangeMap) {
        if (dstRangeMap.isEmpty()) {
            return srcRangeMap.keySet().stream().collect(Collectors.toMap(Function.identity(), Sets::newHashSet));
        }

        // TODO: Callers may use `List<PartitionRange>` directly.
        List<PRangeCellPlus> srcRanges = toPRangeCellPlus(srcRangeMap, true);
        List<PRangeCellPlus> dstRanges = toPRangeCellPlus(dstRangeMap, true);
        return getIntersectedPartitions(srcRanges, dstRanges);
    }
@Test
    public void test_getIntersectedPartitions() throws AnalysisException {
        List<PRangeCellPlus> srcs = Arrays.asList(
                buildPartitionRange("p20230801", "00000101", "20230801"),
                buildPartitionRange("p20230802", "20230801", "20230802"),
                buildPartitionRange("p20230803", "20230802", "20230803")
        );
        List<PRangeCellPlus> dsts = Arrays.asList(
                buildPartitionRange("p000101_202308", "0001-01-01", "2023-08-01"),
                buildPartitionRange("p202308_202309", "2023-08-01", "2023-09-01")
        );
        Map<String, Set<String>> res = SyncPartitionUtils.getIntersectedPartitions(srcs, dsts);
        Assert.assertEquals(
                ImmutableMap.of(
                        "p20230801", ImmutableSet.of("p000101_202308"),
                        "p20230802", ImmutableSet.of("p202308_202309"),
                        "p20230803", ImmutableSet.of("p202308_202309")
                ),
                res);
    }