public void setTableComment(
      final PartialPath database,
      final String tableName,
      final String comment,
      final boolean isView)
      throws MetadataException {
    final TsTable table = getTable(database, tableName);
    final Optional<Pair<TSStatus, TsTable>> check =
        ClusterSchemaManager.checkTable4View(database.getTailNode(), table, isView);
    if (check.isPresent()) {
      throw new SemanticException(
          check.get().getLeft().getMessage(), check.get().getLeft().getCode());
    }
    if (Objects.nonNull(comment)) {
      table.addProp(TsTable.COMMENT_KEY, comment);
    } else {
      table.removeProp(TsTable.COMMENT_KEY);
    }
  }
This method returns the templateId set on paths if the path set matches or is a prefix of input
path pattern.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java