public static Float convertToFloat(Schema schema, Object value) throws DataException {
        if (value == null) {
            return null;
        } else if (value instanceof Float) {
            return (Float) value;
        }
        return (float) asDouble(value, schema, null);
    }
Convert the specified value to a {@link Type#FLOAT32} float value. The supplied schema is required if the value is a logical
type when the schema contains critical information that might be necessary for converting to a floating point number.

@param schema the schema for the value; may be null
@param value  the value to be converted; may be null
@return the representation as a float, or null if the supplied value was null
@throws DataException if the value could not be converted to a float
connect/api/src/main/java/org/apache/kafka/connect/data/Values.java