@Override
  public Object getInitialAggregatedValue(Object rawValue) {
    CpcUnion cpcUnion = new CpcUnion(_lgK);
    if (rawValue instanceof byte[]) { // Serialized Sketch
      byte[] bytes = (byte[]) rawValue;
      cpcUnion.update(deserializeAggregatedValue(bytes));
    } else if (rawValue instanceof byte[][]) { // Multiple Serialized Sketches
      byte[][] serializedSketches = (byte[][]) rawValue;
      for (byte[] bytes : serializedSketches) {
        cpcUnion.update(deserializeAggregatedValue(bytes));
      }
    } else {
      CpcSketch pristineSketch = empty();
      addObjectToSketch(rawValue, pristineSketch);
      cpcUnion.update(pristineSketch);
    }
    return cpcUnion;
  }
@Test
  public void getInitialValueShouldSupportMultiValueTypes() {
    DistinctCountCPCSketchValueAggregator agg = new DistinctCountCPCSketchValueAggregator(Collections.emptyList());
    Integer[] ints = {12345};
    assertEquals(toSketch(agg.getInitialAggregatedValue(ints)).getEstimate(), 1.0);
    Long[] longs = {12345L};
    assertEquals(toSketch(agg.getInitialAggregatedValue(longs)).getEstimate(), 1.0);
    Float[] floats = {12.345f};
    assertEquals(toSketch(agg.getInitialAggregatedValue(floats)).getEstimate(), 1.0);
    Double[] doubles = {12.345d};
    assertEquals(toSketch(agg.getInitialAggregatedValue(doubles)).getEstimate(), 1.0);
    Object[] objects = {new Object()};
    assertThrows(() -> agg.getInitialAggregatedValue(objects));
    byte[][] zeroSketches = {};
    assertEquals(toSketch(agg.getInitialAggregatedValue(zeroSketches)).getEstimate(), 0.0);
  }