Reference nameRef = TestingHelpers.createReference("name", DataTypes.STRING);
GroupProjection groupProjection = new GroupProjection();
groupProjection.keys(Arrays.<DataTypeSymbol>asList(nameRef));
groupProjection.values(Arrays.asList(
new Aggregation(
new FunctionInfo(new FunctionIdent(CountAggregation.NAME, ImmutableList.<DataType>of()), DataTypes.LONG),
ImmutableList.<Symbol>of(),
Aggregation.Step.PARTIAL,
Aggregation.Step.FINAL
)
));