.addSequencePage(10, 100, 0, 100, 0, 500)
.addSequencePage(10, 100, 0, 200, 0, 500)
.addSequencePage(10, 100, 0, 300, 0, 500)
.build();
HashAggregationOperatorFactory operatorFactory = new HashAggregationOperatorFactory(
0,
SINGLE_VARBINARY,
1,
Step.SINGLE,
ImmutableList.of(aggregation(COUNT, new Input(0, 0)),
aggregation(LONG_SUM, new Input(3, 0)),
aggregation(LONG_AVERAGE, new Input(3, 0)),
aggregation(VAR_BINARY_MAX, new Input(2, 0)),
aggregation(COUNT_COLUMN, new Input(0, 0)),
aggregation(LONG_SUM, new Input(4, 1)),
aggregation(DOUBLE_SUM, new Input(4, 2)),
aggregation(VAR_BINARY_MAX, new Input(4, 3))),
100_000);
Operator operator = operatorFactory.createOperator(driverContext);
MaterializedResult expected = resultBuilder(VARIABLE_BINARY, FIXED_INT_64, FIXED_INT_64, DOUBLE, VARIABLE_BINARY, FIXED_INT_64, FIXED_INT_64, DOUBLE, VARIABLE_BINARY)
.row("0", 3, 0, 0.0, "300", 3, 500 * 3, 500.0 * 3, "500")
.row("1", 3, 3, 1.0, "301", 3, 501 * 3, 501.0 * 3, "501")
.row("2", 3, 6, 2.0, "302", 3, 502 * 3, 502.0 * 3, "502")