Package org.apache.datasketches.hive.theta

## Class IntersectSketchUDF

- java.lang.Object
- - org.apache.hadoop.hive.ql.exec.UDF
  - - org.apache.datasketches.hive.theta.IntersectSketchUDF

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

Hive intersection sketch UDF.

### Constructor Summary

Constructors
`IntersectSketchUDF()`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.hadoop.io.BytesWritable` `evaluate​(org.apache.hadoop.io.BytesWritable firstSketchBytes, org.apache.hadoop.io.BytesWritable secondSketchBytes)` Main logic called by hive if sketchSize is not passed in.
`org.apache.hadoop.io.BytesWritable` `evaluate​(org.apache.hadoop.io.BytesWritable firstSketchBytes, org.apache.hadoop.io.BytesWritable secondSketchBytes, long hashSeed)` Main logic called by hive if sketchSize is also passed in.

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

#### IntersectSketchUDF

    public IntersectSketchUDF()

### Method Detail

#### evaluate

    public org.apache.hadoop.io.BytesWritable evaluate​(org.apache.hadoop.io.BytesWritable firstSketchBytes,
                                                       org.apache.hadoop.io.BytesWritable secondSketchBytes,
                                                       long hashSeed)

Main logic called by hive if sketchSize is also passed in. Computes the intersection of two sketches of same or different column.

Parameters:
  `firstSketchBytes` - first sketch to be intersected.
  `secondSketchBytes` - second sketch to be intersected.
  `hashSeed` - Only required if input sketches were constructed using an update seed that was not the default.
Returns:
  resulting sketch of intersection.

#### evaluate

    public org.apache.hadoop.io.BytesWritable evaluate​(org.apache.hadoop.io.BytesWritable firstSketchBytes,
                                                       org.apache.hadoop.io.BytesWritable secondSketchBytes)

Main logic called by hive if sketchSize is not passed in. Computes the intersection of two sketches of same or different column.

Parameters:
  `firstSketchBytes` - first sketch to be intersected.
  `secondSketchBytes` - second sketch to be intersected.
Returns:
  resulting sketch of intersection.