Hive custom - UDF and UDAF implementations