Hive User Defined Functions UDF Row level complex calculation can be placed here to reduce query complexity. The java code is run on each row individually. UDAF Custom aggregation functions can also be implemented in java that are run across the entire dataset.