Package org.apache.datasketches.hive.tuple

## Class DataToSketchUDAF

- java.lang.Object
- - org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDAFResolver
  - - org.apache.datasketches.hive.tuple.DataToSketchUDAF

All Implemented Interfaces:
  `org.apache.hadoop.hive.ql.udf.generic.GenericUDAFResolver`, `org.apache.hadoop.hive.ql.udf.generic.GenericUDAFResolver2`

Direct Known Subclasses:
  `DataToDoubleSummarySketchUDAF`, `DataToDoubleSummaryWithModeSketchUDAF`

    public abstract class DataToSketchUDAF
    extends org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDAFResolver

Note Strings as raw data values are encoded as a UTF-16 VARCHAR prior to being submitted to the sketch. If the user requires a different encoding for cross-platform compatibility, it is recommended that these values be encoded prior to being submitted and then typed as a BINARY byte[].

### Nested Class Summary

Nested Classes
`static class` `DataToSketchUDAF.DataToSketchEvaluator<U,​S extends org.apache.datasketches.tuple.UpdatableSummary<U>>`

### Constructor Summary

Constructors
`DataToSketchUDAF()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected void` `checkExtraArguments​(org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector[] inspectors)` Override this if your UDF has more arguments
`abstract org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator` `createEvaluator()` This is needed because a concrete UDAF is going to have its own concrete evaluator static inner class.
`org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator` `getEvaluator​(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFParameterInfo info)`

### Methods inherited from class org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDAFResolver

`getEvaluator`

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

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

### Constructor Detail

#### DataToSketchUDAF

    public DataToSketchUDAF()

### Method Detail

#### getEvaluator

    public org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator getEvaluator​(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFParameterInfo info)
                                                                            throws org.apache.hadoop.hive.ql.parse.SemanticException

Specified by:
  `getEvaluator` in interface `org.apache.hadoop.hive.ql.udf.generic.GenericUDAFResolver2`
Overrides:
  `getEvaluator` in class `org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDAFResolver`
Throws:
  `org.apache.hadoop.hive.ql.parse.SemanticException`

#### checkExtraArguments

    protected void checkExtraArguments​(org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector[] inspectors)
                                throws org.apache.hadoop.hive.ql.parse.SemanticException

Override this if your UDF has more arguments

Parameters:
  `inspectors` - array of inspectors
Throws:
  `org.apache.hadoop.hive.ql.parse.SemanticException` - if anything is wrong

#### createEvaluator

    public abstract org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator createEvaluator()

This is needed because a concrete UDAF is going to have its own concrete evaluator static inner class.

Returns:
  an instance of evaluator