public void setTableColumnComment(
      final @Nonnull PartialPath database,
      final @Nonnull String tableName,
      final @Nonnull String columnName,
      final @Nullable String comment)
      throws MetadataException {
    final TsTable table = getTable(database, tableName);

    final TsTableColumnSchema columnSchema =
        !columnName.equals(TIME_COLUMN_NAME) || Objects.isNull(comment)
            ? table.getColumnSchema(columnName)
            : new TimeColumnSchema(TIME_COLUMN_NAME, TSDataType.TIMESTAMP);
    if (Objects.isNull(columnSchema)) {
      throw new ColumnNotExistsException(
          PathUtils.unQualifyDatabaseName(database.getFullPath()), tableName, columnName);
    }
    if (Objects.nonNull(comment)) {
      columnSchema.getProps().put(TsTable.COMMENT_KEY, comment);
      if (columnName.equals("time")) {
        // Replace the original time column
        table.addColumnSchema(columnSchema);
      }
    } else {
      columnSchema.getProps().remove(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