linkedin/datafu — pull request #42 by matthayes (2013-07-05 02:10:49+00:00)
Title: Make Quantile output schemas consistent with StreamingQuantile

These two UDFs were inconsistent in how they named the output quantiles. The convention of StreamingQuantile actually made more sense, so standardizing on that.

The convention:
* If you request specific quantiles, the output quantiles will be named based on this. For example, 0.5 yields quantile_0_5.
* If you request n quantiles, then the output quantiles will be labeled 0..(n-1). For example, 3 yields quantile_0, quantile_1, and quantile_3.

Previously if you requested 3 for Quantile you would get 0_0, 0_5, and 1_0. The problem with this convention is that if you requested many quantiles, e.g. 1000, it's hard to know what the names will be. But if you request 1000 you can at least be sure that quantile_499, quantile_500, etc. exist.

Also added test cases which check the output schema by using FOREACH..GENERATE on the names.