private void register(String name, Class<?> clazz) {
      SketchFunctionDescriptor value = new SketchFunctionDescriptor(functionPrefix + name, clazz);
      if (UDF.class.isAssignableFrom(clazz)) {
        Optional<Method> evaluateMethod = getEvaluateMethod(clazz);
        if (evaluateMethod.isPresent()) {
          value.setReturnType(evaluateMethod.get().getGenericReturnType());
        }
      }
      fnMap.put(name, value);
    }
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