src/main/java/org/apache/datasketches/pig/quantiles/DataToDoublesSketch.java [347:365]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          } else if (f0 instanceof DataByteArray) { // inputTuple.bag0.dataTupleN.f0:DBA
            // If field 0 of a dataTuple is a DataByteArray we assume it is a sketch
            // due to system bagged outputs from multiple mapper Intermediate functions.
            // Each dataTuple.DBA:sketch will merged into the union.
            final DataByteArray dba = (DataByteArray) f0;
            union.update(Memory.wrap(dba.get()));
          } else {
            throw new IllegalArgumentException("dataTuple.Field0: Is not a DataByteArray: "
                + f0.getClass().getName());
          }
        }
        final DoublesSketch resultSketch = union.getResultAndReset();
        if (resultSketch != null) {
          return tupleFactory_.newTuple(new DataByteArray(resultSketch.toByteArray(true)));
        }
      }
      // return empty sketch
      return tupleFactory_.newTuple(
        new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/datasketches/pig/quantiles/UnionDoublesSketch.java [342:360]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          } else if (f0 instanceof DataByteArray) { //inputTuple.bag0.dataTupleN.f0:DBA
            // If field 0 of a dataTuple is a DataByteArray we assume it is a sketch from a prior call
            // It is due to system bagged outputs from multiple mapper Intermediate functions.
            // Each dataTuple.DBA:sketch will merged into the union.
            final DataByteArray dba = (DataByteArray) f0;
            union.update(Memory.wrap(dba.get()));
          } else {
            throw new IllegalArgumentException("dataTuple.Field0: Is not a DataByteArray: "
              + f0.getClass().getName());
          }
        }
        final DoublesSketch resultSketch = union.getResultAndReset();
        if (resultSketch != null) {
          return tupleFactory_.newTuple(new DataByteArray(resultSketch.toByteArray(true)));
        }
      }
      // return empty sketch
      return tupleFactory_.newTuple(
          new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



