Package org.apache.datasketches.hive.kll
Class GetRankUDF
- java.lang.Object
-
- org.apache.hadoop.hive.ql.exec.UDF
-
- org.apache.datasketches.hive.kll.GetRankUDF
-
public class GetRankUDF extends org.apache.hadoop.hive.ql.exec.UDF
-
-
Constructor Summary
Constructors Constructor Description GetRankUDF()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Doubleevaluate(org.apache.hadoop.io.BytesWritable serializedSketch, float value)Returns a normalized rank of a given value from a given sketchDoubleevaluate(org.apache.hadoop.io.BytesWritable serializedSketch, Boolean inclusive, float value)Returns a normalized rank of a given value from a given sketch
-
-
-
Method Detail
-
evaluate
public Double evaluate(org.apache.hadoop.io.BytesWritable serializedSketch, float value)
Returns a normalized rank of a given value from a given sketch- Parameters:
serializedSketch- serialized sketchvalue- the given value- Returns:
- rank
-
evaluate
public Double evaluate(org.apache.hadoop.io.BytesWritable serializedSketch, Boolean inclusive, float value)
Returns a normalized rank of a given value from a given sketch- Parameters:
serializedSketch- serialized sketchinclusive- if true the weight of the given item is included into the rank. Otherwise the rank equals the sum of the weights of all items that are less than the given itemvalue- the given value- Returns:
- rank
-
-