in src/main/java/org/apache/datasketches/pig/sampling/VarOptUnion.java [70:86]
public void accumulate(final Tuple inputTuple) throws IOException {
if (inputTuple == null || inputTuple.size() < 1 || inputTuple.isNull(0)) {
return;
}
final DataBag sketches = (DataBag) inputTuple.get(0);
if (this.union_ == null) {
this.union_ = VarOptItemsUnion.newInstance(this.maxK_);
}
for (Tuple t : sketches) {
final DataByteArray dba = (DataByteArray) t.get(0);
final Memory sketch = Memory.wrap(dba.get());
this.union_.update(sketch, SERDE);
}
}