private Optional<Method> getEvaluateMethod(Class<?> clazz) {
      List<Method> evaluateMethods = new ArrayList<Method>();
      for (Method method : clazz.getMethods()) {
        if ("evaluate".equals(method.getName())) {
          evaluateMethods.add(method);
        }
      }
      if (evaluateMethods.size() > 0) {
        return Optional.of(evaluateMethods.get(0));
      } else {
        return Optional.empty();
      }
    }
Registers functions from the DataSketches library as builtin functions.

In an effort to show a more consistent
ql/src/java/org/apache/hadoop/hive/ql/exec/DataSketchesFunctions.java