use of org.apache.drill.exec.physical.config.StreamingAggregate in project drill by apache.
the class BasicPhysicalOpUnitTest method testSimpleStreamAgg.
@Test
public void testSimpleStreamAgg() {
StreamingAggregate aggConf = new StreamingAggregate(null, parseExprs("a", "a"), parseExprs("sum(b)", "b_sum"));
List<String> inputJsonBatches = Lists.newArrayList("[{\"a\": 5, \"b\" : 1 }]", "[{\"a\": 5, \"b\" : 5},{\"a\": 3, \"b\" : 8}]");
legacyOpTestBuilder().physicalOperator(aggConf).inputDataStreamJson(inputJsonBatches).baselineColumns("b_sum", "a").baselineValues(6l, 5l).baselineValues(8l, 3l).go();
}
Aggregations