src/main/java/org/apache/datasketches/hive/cpc/UnionSketchUDAF.java [98:131]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      if (!ObjectInspectorUtils.isConstantObjectInspector(inspectors[2])) {
        throw new UDFArgumentTypeException(2, "The third argument must be a constant");
      }
    }

    return new UnionSketchUDAFEvaluator();
  }

  /**
   * Evaluator class, main logic of our UDAF.
   *
   */
  public static class UnionSketchUDAFEvaluator extends SketchEvaluator {

    @Override
    public AggregationBuffer getNewAggregationBuffer() throws HiveException {
      return new UnionState();
    }

    /**
     * Receives the passed in argument object inspectors and returns the desired
     * return type's object inspector to inform hive of return type of UDAF.
     *
     * @param mode
     *          Mode (i.e. PARTIAL 1, COMPLETE...) for determining input and output
     *          object inspector type.
     * @param parameters
     *          List of object inspectors for input arguments.
     * @return The object inspector type indicates the UDAF return type (i.e.
     *         returned type of terminate(...)).
     */
    @Override
    public ObjectInspector init(final Mode mode, final ObjectInspector[] parameters) throws HiveException {
      super.init(mode, parameters);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/datasketches/hive/hll/UnionSketchUDAF.java [98:131]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      if (!ObjectInspectorUtils.isConstantObjectInspector(inspectors[2])) {
        throw new UDFArgumentTypeException(2, "The third argument must be a constant");
      }
    }

    return new UnionSketchUDAFEvaluator();
  }

  /**
   * Evaluator class, main logic of our UDAF.
   *
   */
  public static class UnionSketchUDAFEvaluator extends SketchEvaluator {

    @Override
    public AggregationBuffer getNewAggregationBuffer() throws HiveException {
      return new UnionState();
    }

    /**
     * Receives the passed in argument object inspectors and returns the desired
     * return type's object inspector to inform hive of return type of UDAF.
     *
     * @param mode
     *          Mode (i.e. PARTIAL 1, COMPLETE...) for determining input and output
     *          object inspector type.
     * @param parameters
     *          List of object inspectors for input arguments.
     * @return The object inspector type indicates the UDAF return type (i.e.
     *         returned type of terminate(...)).
     */
    @Override
    public ObjectInspector init(final Mode mode, final ObjectInspector[] parameters) throws HiveException {
      super.init(mode, parameters);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



