in src/main/java/org/apache/datasketches/hive/quantiles/GetCdfFromStringsSketchUDF.java [68:81]
public List<Double> evaluate(final BytesWritable serializedSketch, final 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[] cdf = sketch.getCDF(splitPoints,
(inclusive ? QuantileSearchCriteria.INCLUSIVE : QuantileSearchCriteria.EXCLUSIVE));
if (cdf == null) { return null; }
return Util.primitivesToList(cdf);
}