public ByteWritable evaluate(FloatWritable i) {
    if (i == null) {
      return null;
    } else {
      byteWritable.set((byte) i.get());
      return byteWritable;
    }
  }
Convert from float to a byte. This is called for CAST(... AS TINYINT)

@param i
         The float value to convert
@return Byte
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToByte.java