public List evaluate()

in src/main/java/org/apache/datasketches/hive/quantiles/GetPmfFromStringsSketchUDF.java [68:81]


  public List<Double> evaluate(final BytesWritable serializedSketch, Boolean inclusive, final String... splitPoints) {
    if (serializedSketch == null) { return null; }
    final ItemsSketch<String> sketch = ItemsSketch.getInstance(
      String.class,
      BytesWritableHelper.wrapAsMemory(serializedSketch),
      Comparator.naturalOrder(),
      new ArrayOfStringsSerDe()
    );
    if (sketch.isEmpty()) { return null; }
    final double[] pmf = sketch.getPMF(splitPoints,
                         (inclusive ? QuantileSearchCriteria.INCLUSIVE : QuantileSearchCriteria.EXCLUSIVE));
    if (pmf == null) { return null; }
    return Util.primitivesToList(pmf);
  }