org.apache.datasketches.pig.quantiles

## Class UnionDoublesSketch.IntermediateFinal

- java.lang.Object
- - org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>
  - - org.apache.datasketches.pig.quantiles.UnionDoublesSketch.IntermediateFinal

Enclosing class:
  UnionDoublesSketch

    public static class UnionDoublesSketch.IntermediateFinal
    extends org.apache.pig.EvalFunc<org.apache.pig.data.Tuple>

Class used to calculate the intermediate or final combiner pass of an Algebraic union operation. This is called from the combiner, and may be called multiple times (from the mapper and from the reducer). It will receive a bag of values returned by either the Intermediate stage 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
`IntermediateFinal()` Default constructor.
`IntermediateFinal(int k)` Constructor with primitives for the intermediate and final passes of an Algebraic function.
`IntermediateFinal(String kStr)` Constructor for the intermediate and final passes of an Algebraic function.

### 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

#### IntermediateFinal

    public IntermediateFinal()

Default constructor. Assumes default k.

#### IntermediateFinal

    public IntermediateFinal(String kStr)

Constructor for the intermediate and final passes of an Algebraic function. Pig will call this and pass the same constructor arguments as the base UDF.

Parameters:
  `kStr` - string representation of k

#### IntermediateFinal

    public IntermediateFinal(int k)

Constructor with primitives for the intermediate and final passes of an Algebraic function.

Parameters:
  `k` - parameter that determines the accuracy and size of the sketch.

### 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`