@Override
  public UpdateSchema addRequiredColumn(String name, Type type, String doc) {
    Preconditions.checkArgument(
        !name.contains("."),
        "Cannot add column with ambiguous name: %s, use addColumn(parent, name, type)",
        name);
    addRequiredColumn(null, name, type, doc);
    return this;
  }
@Test
  public void testAddRequiredColumn() {
    Schema schema = new Schema(required(1, "id", Types.IntegerType.get()));
    Schema expected =
        new Schema(
            required(1, "id", Types.IntegerType.get()),
            required(2, "data", Types.StringType.get()));

    assertThatThrownBy(
            () -> new SchemaUpdate(schema, 1).addRequiredColumn("data", Types.StringType.get()))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Incompatible change: cannot add required column: data");

    Schema result =
        new SchemaUpdate(schema, 1)
            .allowIncompatibleChanges()
            .addRequiredColumn("data", Types.StringType.get())
            .apply();

    assertThat(result.asStruct()).isEqualTo(expected.asStruct());
  }