static boolean hasIds(TypeDescription orcSchema) {
    return OrcSchemaVisitor.visit(orcSchema, new HasIds());
  }
@Test
  public void testHasIds() {
    Schema schema =
        new Schema(
            optional(
                1,
                "data",
                Types.StructType.of(
                    optional(
                        10,
                        "entries",
                        Types.MapType.ofOptional(
                            11, 12, Types.StringType.get(), Types.DateType.get())))),
            optional(2, "intCol", Types.IntegerType.get()),
            optional(3, "longCol", Types.LongType.get()),
            optional(4, "listCol", Types.ListType.ofOptional(40, Types.DoubleType.get())));

    TypeDescription orcSchema = ORCSchemaUtil.removeIds(ORCSchemaUtil.convert(schema));
    assertThat(ORCSchemaUtil.hasIds(orcSchema)).as("Should not have Ids").isFalse();

    TypeDescription map2Col =
        TypeDescription.createMap(TypeDescription.createString(), TypeDescription.createBinary());
    map2Col.setAttribute(ICEBERG_ID_ATTRIBUTE, "4");
    orcSchema.addField("map2Col", map2Col);
    assertThat(ORCSchemaUtil.hasIds(orcSchema))
        .as("Should have Ids after adding one type with Id")
        .isTrue();
  }