@Test
  public void testIntersectWithFullPathPrefixTree3() throws Exception {
    List<PartialPath> partialPathList =
        Arrays.asList(
            new PartialPath("root.sg1.d1.t1.s1"),
            new PartialPath("root.sg1.*.t1.s2"),
            new PartialPath("root.**.h*.**"));
    PathPatternTree patternTree = new PathPatternTree();
    for (PartialPath path : partialPathList) {
      patternTree.appendPathPattern(path);
    }
    patternTree.constructTree();

    List<PartialPath> fullPathPrefixList =
        Arrays.asList(new PartialPath("root.sg1.d1.**"), new PartialPath("root.sg1.d2.**"));
    PathPatternTree fullPathPrefixTree = new PathPatternTree();
    for (PartialPath path : fullPathPrefixList) {
      fullPathPrefixTree.appendPathPattern(path);
    }
    fullPathPrefixTree.constructTree();

    PathPatternTree res =
        PathPatternTreeUtils.intersectWithFullPathPrefixTree(patternTree, fullPathPrefixTree);
    Set<PartialPath> expected =
        new HashSet<PartialPath>() {
          {
            add(new PartialPath("root.sg1.d1.h*.**"));
            add(new PartialPath("root.sg1.d1.t1.s1"));
            add(new PartialPath("root.sg1.d1.t1.s2"));
            add(new PartialPath("root.sg1.d1.**.h*.**"));
            add(new PartialPath("root.sg1.d2.h*.**"));
            add(new PartialPath("root.sg1.d2.**.h*.**"));
            add(new PartialPath("root.sg1.d2.t1.s2"));
          }
        };
    for (PartialPath path : res.getAllPathPatterns()) {
      Assert.assertTrue(expected.remove(path));
    }
    Assert.assertTrue(expected.isEmpty());
  }
@param paths PartialPath list to create PathPatternTree
@param compressedPaths Expected PartialPath list of getAllPathPatterns
@param compressedDevicePaths Expected PartialPath list of getAllDevicePatterns
@throws IOException
iotdb-core/node-commons/src/test/java/org/apache/iotdb/commons/path/PathPatternTreeTest.java