org.apache.datasketches.pig.frequencies

## Class FrequentStringsSketchToEstimates

- java.lang.Object
- - org.apache.pig.EvalFunc<org.apache.pig.data.DataBag>
  - - org.apache.datasketches.pig.frequencies.FrequentStringsSketchToEstimates

    public class FrequentStringsSketchToEstimates
    extends org.apache.pig.EvalFunc<org.apache.pig.data.DataBag>

This UDF converts a FrequentItemsSketch<String> to estimates: {(item, estimate, upper bound, lower bound), ...}

### 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
`FrequentStringsSketchToEstimates()` Instantiate UDF with default error type
`FrequentStringsSketchToEstimates(String errorType)` Instantiate UDF with given error type

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.pig.data.DataBag` `exec(org.apache.pig.data.Tuple input)`
`org.apache.pig.impl.logicalLayer.schema.Schema` `outputSchema(org.apache.pig.impl.logicalLayer.schema.Schema inputSchema)`

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

`allowCompileTimeCalculation, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, 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

#### FrequentStringsSketchToEstimates

    public FrequentStringsSketchToEstimates()

Instantiate UDF with default error type

#### FrequentStringsSketchToEstimates

    public FrequentStringsSketchToEstimates(String errorType)

Instantiate UDF with given error type

Parameters:
  `errorType` - string representation of error type

### Method Detail

#### exec

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

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

#### outputSchema

    public org.apache.pig.impl.logicalLayer.schema.Schema outputSchema(org.apache.pig.impl.logicalLayer.schema.Schema inputSchema)

Overrides:
  `outputSchema` in class `org.apache.pig.EvalFunc<org.apache.pig.data.DataBag>`