Package org.apache.datasketches.hive.cpc

## Class UnionSketchUDF

- java.lang.Object
- - org.apache.hadoop.hive.ql.exec.UDF
  - - org.apache.datasketches.hive.cpc.UnionSketchUDF

    public class UnionSketchUDF
    extends org.apache.hadoop.hive.ql.exec.UDF

Hive union sketch UDF.

### Constructor Summary

Constructors
`UnionSketchUDF()`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.hadoop.io.BytesWritable` `evaluate​(org.apache.hadoop.io.BytesWritable firstSketch, org.apache.hadoop.io.BytesWritable secondSketch)` Union two sketches using default lgK an seed
`org.apache.hadoop.io.BytesWritable` `evaluate​(org.apache.hadoop.io.BytesWritable firstSketch, org.apache.hadoop.io.BytesWritable secondSketch, int lgK)` Union two sketches given explicit lgK and using default seed
`org.apache.hadoop.io.BytesWritable` `evaluate​(org.apache.hadoop.io.BytesWritable firstSketch, org.apache.hadoop.io.BytesWritable secondSketch, int lgK, long seed)` Union two sketches given explicit lgK and seed

### Methods inherited from class org.apache.hadoop.hive.ql.exec.UDF

`getRequiredFiles, getRequiredJars, getResolver, setResolver`

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

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

### Constructor Detail

#### UnionSketchUDF

    public UnionSketchUDF()

### Method Detail

#### evaluate

    public org.apache.hadoop.io.BytesWritable evaluate​(org.apache.hadoop.io.BytesWritable firstSketch,
                                                       org.apache.hadoop.io.BytesWritable secondSketch,
                                                       int lgK,
                                                       long seed)

Union two sketches given explicit lgK and seed

Parameters:
  `firstSketch` - first sketch to be unioned.
  `secondSketch` - second sketch to be unioned.
  `lgK` - final output lgK This must be between 4 and 26.
  `seed` - update seed
Returns:
  resulting sketch of union.

#### evaluate

    public org.apache.hadoop.io.BytesWritable evaluate​(org.apache.hadoop.io.BytesWritable firstSketch,
                                                       org.apache.hadoop.io.BytesWritable secondSketch,
                                                       int lgK)

Union two sketches given explicit lgK and using default seed

Parameters:
  `firstSketch` - first sketch to be unioned.
  `secondSketch` - second sketch to be unioned.
  `lgK` - final output lgK This must be between 4 and 26.
Returns:
  resulting sketch of union.

#### evaluate

    public org.apache.hadoop.io.BytesWritable evaluate​(org.apache.hadoop.io.BytesWritable firstSketch,
                                                       org.apache.hadoop.io.BytesWritable secondSketch)

Union two sketches using default lgK an seed

Parameters:
  `firstSketch` - first sketch to be unioned.
  `secondSketch` - second sketch to be unioned.
Returns:
  resulting sketch of union.