public void accumulate()

in src/main/java/org/apache/datasketches/pig/tuple/UnionSketch.java [94:109]


  public void accumulate(final Tuple inputTuple) throws IOException {
    if (this.isFirstCall_) {
      // this is to see in the log which way was used by Pig
      Logger.getLogger(getClass()).info("accumulator is used");
      this.isFirstCall_ = false;
    }
    if (inputTuple == null || inputTuple.size() != 1) {
      return;
    }
    final DataBag bag = (DataBag) inputTuple.get(0);
    if (bag == null || bag.size() == 0) { return; }
    if (this.union_ == null) {
      this.union_ = new Union<>(this.sketchSize_, this.summarySetOps_);
    }
    updateUnion(bag, this.union_, this.summaryDeserializer_);
  }