Package org.apache.datasketches.hive.kll
Class GetQuantileUDF
- java.lang.Object
-
- org.apache.hadoop.hive.ql.exec.UDF
-
- org.apache.datasketches.hive.kll.GetQuantileUDF
-
public class GetQuantileUDF extends org.apache.hadoop.hive.ql.exec.UDF
-
-
Constructor Summary
Constructors Constructor Description GetQuantileUDF()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Floatevaluate(org.apache.hadoop.io.BytesWritable serializedSketch, double fraction)Returns a quantile value from a given sketch.Floatevaluate(org.apache.hadoop.io.BytesWritable serializedSketch, Boolean inclusive, double fraction)Returns a quantile value from a given sketch
-
-
-
Method Detail
-
evaluate
public Float evaluate(org.apache.hadoop.io.BytesWritable serializedSketch, double fraction)
Returns a quantile value from a given sketch. Equivalent to calling GetQuantile(sketch, true, fraction)- Parameters:
serializedSketch- serialized sketchfraction- value from 0 to 1 inclusive- Returns:
- quantile value
-
evaluate
public Float evaluate(org.apache.hadoop.io.BytesWritable serializedSketch, Boolean inclusive, double fraction)
Returns a quantile value from a given sketch- Parameters:
serializedSketch- serialized sketchinclusive- if true, the given rank is considered inclusive (includes weight of an item)fraction- value from 0 to 1 inclusive- Returns:
- quantile value
-
-