To create a UDF, we need to extend UDF (org.apache.hadoop.hive.ql.exec.UDF) class and implement evaluate method.
Once UDF is complied and JAR is build, we need to add jar to hive context to create a temporary/permanent function.
import org.apache.hadoop.hive.ql.exec.UDF;
class UDFExample ex...