### Question:
TDigestAggregationFunction { private TDigestAggregationFunction() {} private  TDigestAggregationFunction(); @InputFunction static void input(@AggregationState TDigestState state, @SqlType(StandardTypes.DOUBLE) double value); @InputFunction static void weightedInput(@AggregationState TDigestState state, @SqlType(StandardTypes.DOUBLE) double value, @SqlType(StandardTypes.DOUBLE) double weight); @CombineFunction static void combine(@AggregationState TDigestState state, @AggregationState TDigestState otherState); @OutputFunction(StandardTypes.TDIGEST) static void output(@AggregationState TDigestState state, BlockBuilder out);  }### Answer:
@Test public void testTdigestAggregationFunction() { List<Double> weights = ImmutableList.of(1.5, 2.0, 1.1, 1.111, 3.5, 4.4, 4.4, 1.0, 9.9, 9.0); testAggregation( createDoublesBlock(1.0, null, 2.0, null, 3.0, null, 4.0, null, 5.0, null), createDoublesBlock(weights), ImmutableList.of(1.5, 1.1, 3.5, 4.4, 9.9), 1.0, 2.0, 3.0, 4.0, 5.0); testAggregation( createDoublesBlock(null, null, null, null, null), createRLEBlock(1.0, 5), ImmutableList.of()); testAggregation( createDoublesBlock(-1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0, -9.0, -10.0), createDoublesBlock(weights), ImmutableList.copyOf(weights), -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0, -9.0, -10.0); testAggregation( createDoublesBlock(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0), createDoublesBlock(weights), ImmutableList.copyOf(weights), 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0); testAggregation( createDoublesBlock(), createRLEBlock(1.0, 0), ImmutableList.of()); testAggregation( createDoublesBlock(1.0), createRLEBlock(1.1, 1), ImmutableList.of(1.1), 1.0); weights = LongStream.range(-1000, 1000).asDoubleStream().map(number -> 2 - number / 1000.0).boxed().collect(toImmutableList()); testAggregation( TDIGEST_EQUALITY, createDoubleSequenceBlock(-1000, 1000), createDoublesBlock(weights), ImmutableList.copyOf(weights), LongStream.range(-1000, 1000).asDoubleStream().toArray()); }