private static void syncSchema(Schema newer, Schema old, UpdateSchema changeTableUs) {
    // To keep the order of adding columns with base table's
    PriorityQueue<Add> adds = new PriorityQueue<>();

    for (Types.NestedField newField : newer.columns()) {
      Types.NestedField oldField = old.findField(newField.fieldId());
      syncField(newField, oldField, changeTableUs, null, adds);
    }

    old.columns()
        .forEach(
            (c) -> {
              if (newer.findField(c.fieldId()) == null) {
                syncField(null, c, changeTableUs, null, adds);
              }
            });

    doAddColumns(adds, changeTableUs);
    LOG.info(
        "sync schema to changeTable. from: {}, base: {}, actual: {}",
        old,
        newer,
        changeTableUs.apply());
    changeTableUs.commit();
  }
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