static SearchArgument convert(Expression expr, TypeDescription readSchema) {
    Map<Integer, String> idToColumnName =
        ORCSchemaUtil.idToOrcName(ORCSchemaUtil.convert(readSchema));
    SearchArgument.Builder builder = SearchArgumentFactory.newBuilder();
    ExpressionVisitors.visit(expr, new ExpressionToSearchArgument(builder, idToColumnName))
        .invoke();
    return builder.build();
  }
@Test
  public void testModifiedSimpleSchemaNameMapping() {
    Schema originalSchema =
        new Schema(
            required(1, "int", Types.IntegerType.get()),
            optional(2, "long_to_be_dropped", Types.LongType.get()));
    Schema mappingSchema =
        new Schema(
            required(1, "int", Types.IntegerType.get()),
            optional(3, "new_float_field", Types.FloatType.get()));
    TypeDescription orcSchemaWithoutIds =
        ORCSchemaUtil.removeIds(ORCSchemaUtil.convert(originalSchema));
    NameMapping nameMapping = MappingUtil.create(mappingSchema);

    TypeDescription readSchema =
        ORCSchemaUtil.buildOrcProjection(
            mappingSchema, ORCSchemaUtil.applyNameMapping(orcSchemaWithoutIds, nameMapping));

    Expression expr = equal("int", 1);
    Expression boundFilter = Binder.bind(mappingSchema.asStruct(), expr, true);
    SearchArgument expected =
        SearchArgumentFactory.newBuilder().equals("`int`", Type.LONG, 1L).build();

    SearchArgument actual = ExpressionToSearchArgument.convert(boundFilter, readSchema);
    assertThat(actual.toString()).isEqualTo(expected.toString());

    // for columns not in the file, buildOrcProjection will append field names with _r<ID>
    // this will be passed down to ORC, but ORC will handle such cases and return a TruthValue
    // during evaluation
    expr = equal("new_float_field", 1);
    boundFilter = Binder.bind(mappingSchema.asStruct(), expr, true);
    expected =
        SearchArgumentFactory.newBuilder().equals("`new_float_field_r3`", Type.FLOAT, 1.0).build();

    actual = ExpressionToSearchArgument.convert(boundFilter, readSchema);
    assertThat(actual.toString()).isEqualTo(expected.toString());
  }