Hi Jamie, I am also working on a UDF that has to take 2 arguments. Hive detects the number of arguments you declare in your evaluate method automatically it seems so you can work with multiple arguments.
So far so good, but after that I have some problems that the 2nd argument (String in my case) does not seem to be passed on to the evaluate method in the right format during job execution. Jasper 2012/6/26 Jamie <jamieli...@gmail.com> > I'd like to be able to pass some parameters in when creating a temporary > function, something along the lines of > > CREATE TEMPORARY FUNCTION some_udf AS some_class(45, 'something'); > > and then (45, 'something') would get passed to the UDF's constructor or an > initialization function. Is such a thing possible? > > > What I really want to do is to return a struct that has different fields > depending on the input parameters. But it seems like you can't access the > input parameters in the initialize function, so by passing in the > parameters when creating the temporary function. If there's a way to look > at the input parameters when defining the output schema, or telling Hive to > not check the output schema somehow, those would also be helpful. > > Thanks! > -- Met vriendelijke groet, *Jasper Knulst* Consultant *|* Incentro Business Intelligence Gildeweg 5b, Nootdorp The Netherlands, 2632 BD *E:* jasper.knu...@incentro.com *T:* +31157640750 *M: *+31619667511 *W:* www.incentro.com [image: Logo Incentro]<http://www.incentro.com/nl/article/incentro-de-beste-werkgever-van-nederland>