a useful function in the hive reflect

This function can support hive call java's built-in functions,

Demo, can support the generation of the hive uuid table,

regexp_replace(reflect("java.util.UUID", "randomUUID"), "-", "") uuid

Selecting the maximum value may also be generated by other transmission fields

select reflect("java.lang.Math","max",column1,column2) from test_udf

It can be said with this function, simply unimpeded between the hive and java, before I do not know there is such a function, take a lot of injustice road.

With it, my mother no longer have to worry about my job not handle big data BI problem, one that will allow leaders also assured the function

Guess you like

Origin www.cnblogs.com/xinyumuhe/p/11328116.html