@TableModel
  public void removeAttributeColumns() {
    if (columnCategories == null) {
      return;
    }

    List<Integer> columnsToKeep = new ArrayList<>();
    for (int i = 0; i < columnCategories.length; i++) {
      if (!columnCategories[i].equals(TsTableColumnCategory.ATTRIBUTE)) {
        columnsToKeep.add(i);
      }
    }

    if (columnsToKeep.size() == columnCategories.length) {
      return;
    }

    if (failedMeasurementIndex2Info != null) {
      failedMeasurementIndex2Info =
          failedMeasurementIndex2Info.entrySet().stream()
              .collect(Collectors.toMap(e -> columnsToKeep.indexOf(e.getKey()), Entry::getValue));
    }

    if (measurementSchemas != null) {
      measurementSchemas =
          columnsToKeep.stream().map(i -> measurementSchemas[i]).toArray(MeasurementSchema[]::new);
    }
    if (measurements != null) {
      measurements = columnsToKeep.stream().map(i -> measurements[i]).toArray(String[]::new);
    }
    if (dataTypes != null) {
      dataTypes = columnsToKeep.stream().map(i -> dataTypes[i]).toArray(TSDataType[]::new);
    }
    if (columnCategories != null) {
      columnCategories =
          columnsToKeep.stream()
              .map(i -> columnCategories[i])
              .toArray(TsTableColumnCategory[]::new);
    }

    subRemoveAttributeColumns(columnsToKeep);

    // to reconstruct indices
    idColumnIndices = null;
    attrColumnIndices = null;
  }
Resets the state of all measurements marked as failed, clearing the failure records.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertBaseStatement.java