public FloatWritable evaluate(DoubleWritable i) {
    if (i == null) {
      return null;
    } else {
      floatWritable.set((float) i.get());
      return floatWritable;
    }
  }
Convert from double to a float. This is called for CAST(... AS FLOAT)

@param i
         The double value to convert
@return FloatWritable
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToFloat.java