private static void updateField(
      Types.NestedField newField,
      Types.NestedField oldField,
      UpdateSchema us,
      String fieldPrefix,
      Collection<Add> adds) {
    String oldFullFieldName = getFullName(fieldPrefix, oldField.name());
    if (!Objects.equals(newField.doc(), oldField.doc())) {
      us.updateColumnDoc(oldFullFieldName, newField.doc());
    }

    if (!Objects.equals(newField.isRequired(), oldField.isRequired())) {
      if (newField.isRequired()) {
        us.requireColumn(oldFullFieldName);
      } else {
        us.makeColumnOptional(oldFullFieldName);
      }
    }

    if (!Objects.equals(newField.name(), oldField.name())) {
      us.renameColumn(oldFullFieldName, newField.name());
    }

    if (newField.type().isPrimitiveType()) {
      updatePrimativeFieldType(newField, oldField, us, fieldPrefix);
    } else {
      updateNestedField(newField, oldField, us, fieldPrefix, adds);
    }
  }
Apply the pending changes to the original schema and returns the result.

<p>This does not result in a permanent update.

@return the result Schema when all pending updates are applied
amoro-format-iceberg/src/main/java/org/apache/amoro/op/KeyedSchemaUpdate.java