@Override
  public UpdateSchema addColumn(String name, Type type, String doc) {
    Preconditions.checkArgument(
        !name.contains("."),
        "Cannot add column with ambiguous name: %s, use addColumn(parent, name, type)",
        name);
    return addColumn(null, name, type, doc);
  }
@Test
  public void testAddAlreadyExists() {
    assertThatThrownBy(
            () -> {
              UpdateSchema update = new SchemaUpdate(SCHEMA, SCHEMA_LAST_COLUMN_ID);
              update.addColumn("preferences", "feature1", Types.BooleanType.get());
            })
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot add column, name already exists: preferences.feature1");

    assertThatThrownBy(
            () -> {
              UpdateSchema update = new SchemaUpdate(SCHEMA, SCHEMA_LAST_COLUMN_ID);
              update.addColumn("preferences", Types.BooleanType.get());
            })
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot add column, name already exists: preferences");
  }