Record convert(Object data) {
    return convert(data, null);
  }
@Test
  public void testEvolveTypeDetectionStructNested() {
    org.apache.iceberg.Schema structColSchema =
        new org.apache.iceberg.Schema(
            NestedField.required(1, "ii", IntegerType.get()),
            NestedField.required(2, "ff", FloatType.get()));

    org.apache.iceberg.Schema tableSchema =
        new org.apache.iceberg.Schema(
            NestedField.required(3, "i", IntegerType.get()),
            NestedField.required(4, "st", structColSchema.asStruct()));

    Table table = mock(Table.class);
    when(table.schema()).thenReturn(tableSchema);
    RecordConverter converter = new RecordConverter(table, config);

    Schema structSchema =
        SchemaBuilder.struct().field("ii", Schema.INT64_SCHEMA).field("ff", Schema.FLOAT64_SCHEMA);
    Schema schema =
        SchemaBuilder.struct().field("i", Schema.INT32_SCHEMA).field("st", structSchema);
    Struct structValue = new Struct(structSchema).put("ii", 11L).put("ff", 22d);
    Struct data = new Struct(schema).put("i", 1).put("st", structValue);

    SchemaUpdate.Consumer consumer = new SchemaUpdate.Consumer();
    converter.convert(data, consumer);
    Collection<UpdateType> updates = consumer.updateTypes();

    assertThat(updates).hasSize(2);

    Map<String, UpdateType> updateMap = Maps.newHashMap();
    updates.forEach(update -> updateMap.put(update.name(), update));

    assertThat(updateMap.get("st.ii").type()).isInstanceOf(LongType.class);
    assertThat(updateMap.get("st.ff").type()).isInstanceOf(DoubleType.class);
  }