hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pradeep Kamath" <prade...@yahoo-inc.com>
Subject RE: UDF with parameters?
Date Tue, 26 May 2009 17:45:05 GMT
You should be able to send the percentile rank that you want to
calculate as a udf argument like the way you stated - generate
Percentile(90, duration) - here 90 will be an integer constant sent as
the first argument to your udf. 

-----Original Message-----
From: Brian Long [mailto:brian@dotspots.com] 
Sent: Friday, May 22, 2009 3:38 PM
To: pig-dev@hadoop.apache.org
Subject: UDF with parameters?


I'm interested in developing a PERCENTILE UDF, e.g. for calculating a
median, 99th percentile, 90th percentile, etc. I'd like the UDF to be
parametric with respect to the percentile being requested, but I don't
any way to do that, and it seems like I might need to create
PERCENTILE_90, etc type UDFs explicitly, versus being able to do
like GENERATE PERCENTILE(90, duration)

I'm new to Pig, so I might be missing the way to do this... is it


View raw message