public GenericUDAFEvaluator getEvaluator()

in src/main/java/org/apache/datasketches/hive/kll/DataToSketchUDAF.java [42:55]


  public GenericUDAFEvaluator getEvaluator(final GenericUDAFParameterInfo info)
      throws SemanticException {
    final ObjectInspector[] inspectors = info.getParameterObjectInspectors();
    if ((inspectors.length != 1) && (inspectors.length != 2)) {
      throw new UDFArgumentException("One or two arguments expected");
    }
    ObjectInspectorValidator.validateGivenPrimitiveCategory(inspectors[0], 0,
        PrimitiveCategory.FLOAT);
    if (inspectors.length == 2) {
      ObjectInspectorValidator.validateGivenPrimitiveCategory(inspectors[1], 1,
          PrimitiveCategory.INT);
    }
    return new DataToSketchEvaluator();
  }