Class ExcludeSketchUDF
- java.lang.Object
-
- org.apache.hadoop.hive.ql.exec.UDF
-
- org.apache.datasketches.hive.theta.ExcludeSketchUDF
-
public class ExcludeSketchUDF extends org.apache.hadoop.hive.ql.exec.UDFHive exclude sketch UDF. (i.e. in sketch a but not in sketch b)
-
-
Constructor Summary
Constructors Constructor Description ExcludeSketchUDF()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.hadoop.io.BytesWritableevaluate(org.apache.hadoop.io.BytesWritable firstSketchBytes, org.apache.hadoop.io.BytesWritable secondSketchBytes)Main logic called by hive if hashUpdateSeed is not passed in.org.apache.hadoop.io.BytesWritableevaluate(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.
-
-
-
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 hash in first sketch excluding the hash in second sketch of two sketches of same or different column.- Parameters:
firstSketchBytes- first sketch to be included.secondSketchBytes- second sketch to be excluded.hashSeed- Only required if input sketches were constructed using an update seed that was not the default.- Returns:
- resulting sketch of exclusion.
-
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 hashUpdateSeed is not passed in. Computes the hash in first sketch excluding the hash in second sketch of two sketches of same or different column.- Parameters:
firstSketchBytes- first sketch to be included.secondSketchBytes- second sketch to be excluded.- Returns:
- resulting sketch of exclusion.
-
-