public static double greaterThanSelectivity(KllFloatsSketch kll, float value) {
    float max = kll.getMaxItem();
    if (value > max) {
      return 0;
    }
    float nextValue = Math.nextUp(value);
    if (Double.compare(value, max) == 0 || Double.compare(nextValue, max) == 0) {
      return 0;
    }
    return rangedSelectivity(kll, nextValue, Math.nextUp(max));
  }
Returns the selectivity of a predicate "column &gt; value" in the range [0, 1]
@param kll the KLL sketch for the involved column
@param value the literal used in the comparison
@return the selectivity of a predicate "column &gt; value" in the range [0, 1]
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/FilterSelectivityEstimator.java