public BooleanWritable evaluate(IntWritable i) {
    if (i == null) {
      return null;
    } else {
      booleanWritable.set(i.get() != 0);
      return booleanWritable;
    }
  }
Convert from a integer to boolean. This is called for CAST(... AS BOOLEAN)

@param i
         The integer value to convert
@return BooleanWritable
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToBoolean.java