FunctionInfo countInfo = new FunctionInfo(new FunctionIdent("count", ImmutableList.<DataType>of()), DataTypes.LONG);
Aggregation countAggregation =
new Aggregation(countInfo, ImmutableList.<Symbol>of(), Aggregation.Step.ITER, Aggregation.Step.PARTIAL);
Functions functions = new ModulesBuilder()
.add(new AggregationImplModule()).createInjector().getInstance(Functions.class);
AggregationContext aggregationContext = new AggregationContext(
(AggregationFunction)functions.get(countInfo.ident()),
countAggregation);
AggregationContext[] aggregations = new AggregationContext[] { aggregationContext };
GroupingProjector projector = new GroupingProjector(
Arrays.asList(DataTypes.STRING),