public static void validatePatternPath(PartialPath path) throws AuthException {
    validatePath(path);
    if (!path.hasWildcard()) {
      return;
    } else if (!PathPatternUtil.isMultiLevelMatchWildcard(path.getTailNode())) {
      // check a.b.*.c/ a.b.**.c/ a.b*.c/ a.b.c.*
      throw new AuthException(
          TSStatusCode.ILLEGAL_PARAMETER,
          String.format(
              "Illegal pattern path: %s, only pattern path that end with ** are supported.", path));
    }
    for (int i = 0; i < path.getNodeLength() - 1; i++) {
      if (PathPatternUtil.hasWildcard(path.getNodes()[i])) {
        throw new AuthException(
            TSStatusCode.ILLEGAL_PARAMETER,
            String.format(
                "Illegal pattern path: %s, only pattern path that end with wildcards are supported.",
                path));
      }
    }
  }
Validate path

@param path series path
@throws AuthException contains message why path is invalid
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java