public boolean overlapWith(PartialPath rPath) {
    String[] rNodes = rPath.getNodes();
    for (int i = 0; i < this.nodes.length && i < rNodes.length; i++) {
      // if encounter MULTI_LEVEL_PATH_WILDCARD
      if (nodes[i].equals(MULTI_LEVEL_PATH_WILDCARD)
          || rNodes[i].equals(MULTI_LEVEL_PATH_WILDCARD)) {
        return checkOverlapWithMultiLevelWildcard(nodes, rNodes);
      }
      // if without MULTI_LEVEL_PATH_WILDCARD, scan and check
      if ((PathPatternUtil.hasWildcard(nodes[i])
              && PathPatternUtil.isNodeMatch(nodes[i], rNodes[i]))
          || (PathPatternUtil.hasWildcard(rNodes[i])
              && PathPatternUtil.isNodeMatch(rNodes[i], nodes[i]))) {
        continue;
      }
      if (!nodes[i].equals(rNodes[i])) {
        return false;
      }
    }
    return this.nodes.length == rNodes.length;
  }
Test if this path pattern overlaps with input path pattern. Overlap means the result sets
generated by two path pattern share some common elements. e.g. "root.sg.**" overlaps with
"root.**", "root.*.d.s" overlaps with "root.sg.d.s", "root.sg.**" overlaps with "root.**.s",
"root.*.d.s" doesn't overlap with "root.sg.d1.*"

@param rPath a pattern path of a timeseries
@return true if overlapping otherwise return false
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/PartialPath.java