org.apache.datasketches.pig.frequencies

## Class UnionFrequentItemsSketchAlgebraicIntermediateFinal<T>

- java.lang.Object
- - org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>
  - - org.apache.datasketches.pig.frequencies.UnionFrequentItemsSketchAlgebraicIntermediateFinal<T>

Type Parameters:
  `T` - Type of item

Direct Known Subclasses:
  UnionFrequentStringsSketch.IntermediateFinal

    public abstract class UnionFrequentItemsSketchAlgebraicIntermediateFinal<T>
    extends org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>

This is to calculate the intermediate pass (combiner) or the final pass (reducer) of an Algebraic sketch operation. This may be called multiple times (from the mapper and from the reducer). It will receive a bag of values returned by either the Intermediate or the Initial stages, so it needs to be able to differentiate between and interpret both types.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.pig.EvalFunc

`org.apache.pig.EvalFunc.SchemaType`

### Field Summary

### Fields inherited from class org.apache.pig.EvalFunc

`log, pigLogger, reporter, returnType`

### Constructor Summary

Constructors
Constructor and Description
`UnionFrequentItemsSketchAlgebraicIntermediateFinal()` Default constructor to make pig validation happy.
`UnionFrequentItemsSketchAlgebraicIntermediateFinal(int sketchSize, org.apache.datasketches.ArrayOfItemsSerDe<T> serDe)`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.pig.data.Tuple` `exec(org.apache.pig.data.Tuple inputTuple)`

### Methods inherited from class org.apache.pig.EvalFunc

`allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### UnionFrequentItemsSketchAlgebraicIntermediateFinal

    public UnionFrequentItemsSketchAlgebraicIntermediateFinal()

Default constructor to make pig validation happy.

#### UnionFrequentItemsSketchAlgebraicIntermediateFinal

    public UnionFrequentItemsSketchAlgebraicIntermediateFinal(int sketchSize,
                                                              org.apache.datasketches.ArrayOfItemsSerDe<T> serDe)

### Method Detail

#### exec

    public org.apache.pig.data.Tuple exec(org.apache.pig.data.Tuple inputTuple)
                                   throws IOException

Specified by:
  `exec` in class `org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>`
Throws:
  `IOException`