The Difference Using Java and Hadoop Types in Hive UDF -
when writing simple hive udf, possible use both standard java , hadoop types in evaluate()
method. example, following methods should return same results.
using string input , output types:
public string evaluate(string input) { if(input == null) return null; return input.touppercase(); }
using text input , output types:
public text evaluate(text input) { if(input == null) return null; return new text(input.tostring().touppercase()); }
my question benefits of using 1 vs other? if use standard java input , output types (like string) hadoop converting these objects hadoop types me?
Comments
Post a Comment