Re: Help with simple UDF error.. [fixed]
On 2/13/14, 9:20 AM, John Meagher wrote: Try changing ArrayList to just List as the argument to the evaluate function. +1 worked thanks!
Re: Help with simple UDF error..
Try changing ArrayList to just List as the argument to the evaluate function. On Thu, Feb 13, 2014 at 12:15 PM, Manish wrote: > Hello: > While running the hive query : > > hive> select "Actor", count (*) from metrics where > array_contains(type_tuple, "Actor") and checkAttributes (attribute_tuple, > "p1", "Actor") ; > > I get this error : > > FAILED: SemanticException [Error 10014]: Line 1:103 Wrong arguments > '"Actor"': No matching method for class yk.HiveCheckAllAttributes with > (array, string, string). Possible choices: _FUNC_(string, string, > string) > > > the metrics hive table schema looks like : > > hive> describe metrics; > OK > col_name data_type comment > entity_uuid string > type_tuple array > attribute_tuple array > > > the class yk.HiveCheckAllAttributes extends UDF and has evaluate method > defined as : > > --snip-- > public boolean evaluate(ArrayList payload, String pType, String > type) { > ... > } > > I have tried Text type and still go the same error.. > --snip-- > public boolean evaluate(Text payload, String pType, String type) { > ... > } > > > > How can I pass Hive Array as an argument to a simple UDF? > > /Manish
Help with simple UDF error..
Hello: While running the hive query : hive> select "Actor", count (*) from metrics where array_contains(type_tuple, "Actor") and checkAttributes (attribute_tuple, "p1", "Actor") ; I get this error : FAILED: SemanticException [Error 10014]: Line 1:103 Wrong arguments '"Actor"': No matching method for class yk.HiveCheckAllAttributes with (array, string, string). Possible choices: _FUNC_(string, string, string) the metrics hive table schema looks like : hive> describe metrics; OK col_name data_type comment entity_uuid string type_tuple array attribute_tuple array the class yk.HiveCheckAllAttributes extends UDF and has evaluate method defined as : —snip-- public boolean evaluate(ArrayList payload, String pType, String type) { … } I have tried Text type and still go the same error.. —snip-- public boolean evaluate(Text payload, String pType, String type) { … } How can I pass Hive Array as an argument to a simple UDF? /Manish