Search in sources :

Example 1 with MinimumAggregation

use of io.crate.execution.engine.aggregation.impl.MinimumAggregation in project crate by crate.

the class GroupingStringCollectorBenchmark method createGroupByMinBytesRefCollector.

private GroupingCollector createGroupByMinBytesRefCollector(Functions functions) {
    InputCollectExpression keyInput = new InputCollectExpression(0);
    List<Input<?>> keyInputs = Collections.singletonList(keyInput);
    CollectExpression[] collectExpressions = new CollectExpression[] { keyInput };
    MinimumAggregation minAgg = (MinimumAggregation) functions.getQualified(Signature.aggregate(MinimumAggregation.NAME, DataTypes.STRING.getTypeSignature(), DataTypes.STRING.getTypeSignature()), List.of(DataTypes.STRING), DataTypes.STRING);
    return GroupingCollector.singleKey(collectExpressions, AggregateMode.ITER_FINAL, new AggregationFunction[] { minAgg }, new Input[][] { new Input[] { keyInput } }, new Input[] { Literal.BOOLEAN_TRUE }, RamAccounting.NO_ACCOUNTING, memoryManager, Version.CURRENT, keyInputs.get(0), DataTypes.STRING, Version.CURRENT);
}
Also used : Input(io.crate.data.Input) InputCollectExpression(io.crate.execution.engine.collect.InputCollectExpression) CollectExpression(io.crate.execution.engine.collect.CollectExpression) InputCollectExpression(io.crate.execution.engine.collect.InputCollectExpression) MinimumAggregation(io.crate.execution.engine.aggregation.impl.MinimumAggregation)

Aggregations

Input (io.crate.data.Input)1 MinimumAggregation (io.crate.execution.engine.aggregation.impl.MinimumAggregation)1 CollectExpression (io.crate.execution.engine.collect.CollectExpression)1 InputCollectExpression (io.crate.execution.engine.collect.InputCollectExpression)1