Class GetRankUDF


  • public class GetRankUDF
    extends org.apache.hadoop.hive.ql.exec.UDF
    • Constructor Detail

      • GetRankUDF

        public GetRankUDF()
    • 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 sketch
        value - 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 sketch
        inclusive - 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 item
        value - the given value
        Returns:
        rank