@UdafFactory(description = "collect distinct values of a Bigint field into a single Array")
  public static <T> Udaf<T, List<T>, List<T>> createCollectSetT() {
    return new Collect<>();
  }
@Test
  public void shouldCollectDistinctDates() {
    final Udaf<Date, List<Date>, List<Date>> udaf = CollectSetUdaf.createCollectSetT();
    final Date[] values = new Date[] {new Date(1), new Date(2)};
    List<Date> runningList = udaf.initialize();
    for (final Date i : values) {
      runningList = udaf.aggregate(i, runningList);
    }
    assertThat(runningList, contains(new Date(1), new Date(2)));
  }