mergeNode.contextId(UUID.randomUUID());
mergeNode.executionNodes(nodes);
mergeNode.inputTypes(Arrays.<DataType>asList(DataTypes.UNDEFINED, DataTypes.STRING));
GroupProjection groupProjection = new GroupProjection();
groupProjection.keys(Arrays.<DataTypeSymbol>asList(new InputColumn(1, DataTypes.STRING)));
groupProjection.values(Arrays.asList(
new Aggregation(
countAggregation.info(),
ImmutableList.<Symbol>of(new InputColumn(0)),
Aggregation.Step.PARTIAL,
Aggregation.Step.FINAL
)
));
TopNProjection topNProjection = new TopNProjection(
10, 0, Arrays.<Symbol>asList(new InputColumn(1)), new boolean[] { false }, new Boolean[] { null });
topNProjection.outputs(Arrays.<Symbol>asList(new InputColumn(0), new InputColumn(1)));
mergeNode.projections(Arrays.asList(groupProjection, topNProjection));
mergeNode.outputTypes(Arrays.<DataType>asList(DataTypes.STRING, DataTypes.LONG));
Streamer<?>[] mapperOutputStreamer = new Streamer[] {