@Override
  public Object getInitialAggregatedValue(Object rawValue) {
    Union thetaUnion = _setOperationBuilder.buildUnion();
    if (rawValue instanceof byte[]) { // Serialized Sketch
      byte[] bytes = (byte[]) rawValue;
      Sketch sketch = deserializeAggregatedValue(bytes);
      thetaUnion.union(sketch);
    } else if (rawValue instanceof byte[][]) { // Multiple Serialized Sketches
      byte[][] serializedSketches = (byte[][]) rawValue;
      for (byte[] sketchBytes : serializedSketches) {
        thetaUnion.union(deserializeAggregatedValue(sketchBytes));
      }
    } else {
      singleItemUpdate(thetaUnion, rawValue);
    }
    _maxByteSize = Math.max(_maxByteSize, thetaUnion.getCurrentBytes());
    return thetaUnion;
  }
@Test
  public void getInitialValueShouldSupportDifferentTypes() {
    DistinctCountThetaSketchValueAggregator agg = new DistinctCountThetaSketchValueAggregator();
    assertEquals(toSketch(agg.getInitialAggregatedValue(12345)).getEstimate(), 1.0);
    assertEquals(toSketch(agg.getInitialAggregatedValue(12345L)).getEstimate(), 1.0);
    assertEquals(toSketch(agg.getInitialAggregatedValue(12.345f)).getEstimate(), 1.0);
    assertEquals(toSketch(agg.getInitialAggregatedValue(12.345d)).getEstimate(), 1.0);
    assertThrows(() -> agg.getInitialAggregatedValue(new Object()));
  }