@Override
  public Object evaluate(DeferredObject[] arguments) throws HiveException {
    Object[] fieldValues = new Object[arguments.length];
    for(int i = 0; i < arguments.length; i++) {
      fieldValues[i] = arguments[i].get();
    }
    int r = ObjectInspectorUtils.getBucketHashCodeOld(fieldValues, argumentOIs);
    result.set(r);
    return result;
  }
GenericUDF Class for computing hash values.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java