public static Comparator<StructLike> forType(Types.StructType struct) {
    return new StructLikeComparator(struct);
  }
@Test
  public void testStruct() {
    assertComparesCorrectly(
        Comparators.forType(
            Types.StructType.of(
                Types.NestedField.required(18, "str19", Types.StringType.get()),
                Types.NestedField.required(19, "int19", Types.IntegerType.get()))),
        TestHelpers.Row.of("a", 1),
        TestHelpers.Row.of("a", 2));

    assertComparesCorrectly(
        Comparators.forType(
            Types.StructType.of(Types.NestedField.optional(18, "str19", Types.StringType.get()))),
        TestHelpers.Row.of((String) null),
        TestHelpers.Row.of("a"));
  }