org.apache.datasketches.pig.sampling

## Class GetVarOptSamples

- java.lang.Object
- - org.apache.pig.EvalFunc<org.apache.pig.data.DataBag>
  - - org.apache.datasketches.pig.sampling.GetVarOptSamples

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

This UDF extracts samples from the binary image of a VarOpt<Tuple> sketch. Because the input is a binary object, this UDF is unable to automatically determine the data schema at query planning time, beyond knowing that the result will be a `DataBag` of (varOptWeight, (record)) tuples.

Author:
  Jon Malkin

### 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
`GetVarOptSamples()`

### Method Summary

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

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

#### GetVarOptSamples

    public GetVarOptSamples()

### Method Detail

#### exec

    public org.apache.pig.data.DataBag exec(org.apache.pig.data.Tuple inputTuple)
                                     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 input)

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