assertEquals(DataTypes.UNDEFINED.streamer(), ctx.outputStreamers()[1]);
}
@Test
public void testGetOutputStreamersFromCollectNodeWithAggregations() throws Exception {
CollectNode collectNode = new CollectNode("bla", new Routing(new HashMap<String, Map<String, Set<Integer>>>()));
collectNode.outputTypes(Arrays.<DataType>asList(DataTypes.BOOLEAN, null, null, DataTypes.DOUBLE));
AggregationProjection aggregationProjection = new AggregationProjection();
aggregationProjection.aggregations(Arrays.asList( // not a real use case, only for test convenience, sorry
new Aggregation(maxInfo, Arrays.<Symbol>asList(new InputColumn(0)), Aggregation.Step.ITER, Aggregation.Step.FINAL),
new Aggregation(maxInfo, Arrays.<Symbol>asList(new InputColumn(1)), Aggregation.Step.ITER, Aggregation.Step.PARTIAL)
));
collectNode.projections(Arrays.<Projection>asList(aggregationProjection));
PlanNodeStreamerVisitor.Context ctx = visitor.process(collectNode);
Streamer<?>[] streamers = ctx.outputStreamers();
assertThat(streamers.length, is(4));
assertThat(streamers[0], instanceOf(DataTypes.BOOLEAN.streamer().getClass()));
assertThat(streamers[1], instanceOf(DataTypes.INTEGER.streamer().getClass()));