linkedin/datafu — pull request #30 by rafaelbarreto87 (2013-03-28 06:29:00+00:00)
Title: Fixed StreamingQuantile.outputSchema so that it conforms to the real output

The StreamingQuantile UDF generates intermediary quantiles but outputs only the request quantiles. However, the outputSchema method does not reflect that. So the following Pig script breaks with an incompatible schema error:

define Quantiles datafu.pig.stats.StreamingQuantile('0.5', '0.9', '0.95', '1');
A = foreach B generate flatten(Quantiles(B.C)) as (q1, q2, q3, q4);

I changed the outputSchema so that only the requested quantiles are in the schema.