public FloatWritable evaluate(BooleanWritable i) {
    if (i == null) {
      return null;
    } else {
      floatWritable.set(i.get() ? (float) 1.0 : (float) 0.0);
      return floatWritable;
    }
  }
Convert from boolean to a float. This is called for CAST(... AS FLOAT)

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