private void processMultiUpdateAfter(RowData row) {
    RowKind rowKind = row.getRowKind();
    if (RowKind.UPDATE_BEFORE.equals(rowKind) || RowKind.UPDATE_AFTER.equals(rowKind)) {
      PrimaryKeyData primaryKey = getPrimaryKey();
      primaryKey.primaryKey(asStructLike(row));

      if (RowKind.UPDATE_AFTER.equals(rowKind)) {
        if (!hasUpdateBeforeKeys.contains(primaryKey)) {
          row.setRowKind(RowKind.INSERT);
        } else {
          hasUpdateBeforeKeys.remove(primaryKey);
        }
      } else {
        PrimaryKeyData copyKey = primaryKey.copy();
        hasUpdateBeforeKeys.add(copyKey);
      }
    }
  }
Turn update_after to insert if there isn't update_after followed by update_before.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/write/FlinkChangeTaskWriter.java