protected float convertFloat(Object value) {
    if (value instanceof Number) {
      return ((Number) value).floatValue();
    } else if (value instanceof String) {
      return Float.parseFloat((String) value);
    }
    throw new IllegalArgumentException("Cannot convert to float: " + value.getClass().getName());
  }
@Test
  public void testFloatConversion() {
    Table table = mock(Table.class);
    when(table.schema()).thenReturn(SIMPLE_SCHEMA);

    RecordConverter converter = new RecordConverter(table, config);

    float expectedFloat = 123f;

    ImmutableList.of("123", 123, 123L, 123d, expectedFloat)
        .forEach(
            input -> {
              float val = converter.convertFloat(input);
              assertThat(val).isEqualTo(expectedFloat);
            });
  }