@@ -0,0 +1,716 @@
+package pg.hadoop.pig;%0A%0Aimport org.apache.pig.EvalFunc;%0Aimport org.apache.pig.data.Tuple;%0A%0Aimport java.io.IOException;%0A%0A/**%0A * Returns the hashcode of the given String or Number.%0A */%0Apublic class HashCode extends EvalFunc%3CInteger%3E %7B%0A%0A    @Override%0A    public Integer exec(final Tuple input) throws IOException %7B%0A        if (input.size() != 1) %7B%0A            throw new IllegalArgumentException(%22HashCode function requires a String or Number parameter.%22);%0A        %7D%0A%0A        final Object obj = input.get(0);%0A        if (!(obj instanceof String) && !(obj instanceof Number)) %7B%0A            throw new IllegalArgumentException(%22HashCode only supports Strings and Numbers%22);%0A        %7D%0A        return obj.hashCode();%0A    %7D%0A%7D%0A

Add pig HashCode UDF.