use of org.apache.druid.query.aggregation.first.StringFirstAggregatorFactory in project druid by druid-io.
the class FinalizingFieldAccessPostAggregatorTest method testResultArraySignature.
@Test
public void testResultArraySignature() {
final TimeseriesQuery query = Druids.newTimeseriesQueryBuilder().dataSource("dummy").intervals("2000/3000").granularity(Granularities.HOUR).aggregators(new CountAggregatorFactory("count"), new StringFirstAggregatorFactory("stringo", "col", null, 1024)).postAggregators(new FieldAccessPostAggregator("a", "stringo"), new FinalizingFieldAccessPostAggregator("b", "stringo")).build();
Assert.assertEquals(RowSignature.builder().addTimeColumn().add("count", ColumnType.LONG).add("stringo", null).add("a", StringFirstAggregatorFactory.TYPE).add("b", ColumnType.STRING).build(), new TimeseriesQueryQueryToolChest().resultArraySignature(query));
}
Aggregations