A pig udf to compute and use the HyperLogLog algorithm