@Test
  public void testAddRequiredColumnToIcebergTable() throws IOException {
    // Create an Iceberg table with the columns customer_id, first_name and last_name without initial data.
    // The reason why not to add initial data is that adding a required column is an incompatible change in Iceberg.
    // So there is no contract on what happens when trying to read the old data back. It behaves differently depending
    // on the underlying file format. So there is no point creating a test for that as there is no expected behaviour.
    Table icebergTable = testTables.createTable(shell, "customers", HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
        fileFormat, null);

    // Add a new required column (age long) to the Iceberg table.
    icebergTable.updateSchema().allowIncompatibleChanges().addRequiredColumn("age", Types.LongType.get()).commit();
    if (testTableType != TestTables.TestTableType.HIVE_CATALOG) {
      // We need to update columns for non-Hive catalogs
      shell.executeStatement("ALTER TABLE customers UPDATE COLUMNS");
    }

    Schema customerSchemaWithAge = new Schema(optional(1, "customer_id", Types.LongType.get()),
        optional(2, "first_name", Types.StringType.get(), "This is first name"),
        optional(3, "last_name", Types.StringType.get(), "This is last name"),
        required(4, "age", Types.LongType.get()));

    // Insert some data with age column from Hive.
    shell.executeStatement(
        "INSERT INTO default.customers values (0L, 'Lily', 'Magenta', 28L), (1L, 'Roni', 'Purple', 33L)");

    // Do a 'select *' from Hive and check if the age column appears in the result.
    List<Record> customersWithAge = TestHelper.RecordsBuilder.newInstance(customerSchemaWithAge)
        .add(0L, "Lily", "Magenta", 28L).add(1L, "Roni", "Purple", 33L).build();
    List<Object[]> rows = shell.executeStatement("SELECT * FROM default.customers");
    HiveIcebergTestUtils.validateData(customersWithAge, HiveIcebergTestUtils.valueForRow(customerSchemaWithAge, rows),
        0);

    // Should add test step to insert NULL value into the new required column. But at the moment it
    // works inconsistently for different file types, so leave it for later when this behaviour is cleaned up.
  }
Tests that schema changes of Iceberg backed Hive tables are correctly reflected in subsequent select statements.
Verification is done from both ends:
 - when ALTER TABLE statements were initiated from Hive
 - when schema changes were originally done on the Iceberg table
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergSchemaEvolution.java