Package com.facebook.presto.operator

Examples of com.facebook.presto.operator.AggregationFunctionDefinition


                3.0);
    }

    private static void assertFinal(AggregationFunction function, Page[] inputs, Object expectedValue)
    {
        AggregationFunctionDefinition definition = aggregation(function, new Input(0, 0));

        MaterializedResult expected = MaterializedResult.resultBuilder(function.getFinalTupleInfo())
                .row(expectedValue)
                .build();
View Full Code Here


    {
        List<Input> inputs = new ArrayList<>();
        for (int i = 0; i < input.getChannelCount(); i++) {
            inputs.add(new Input(i, 0));
        }
        AggregationFunctionDefinition definition = aggregation(function, inputs);

        MaterializedResult expected = MaterializedResult.resultBuilder(function.getFinalTupleInfo())
                .row(new Object[] {expectedValue})
                .build();
View Full Code Here

        List<Input> inputs = new ArrayList<>();
        for (int i = 0; i < input.getChannelCount(); i++) {
            inputs.add(new Input(i, 0));
        }

        AggregationFunctionDefinition definition = aggregation(function, inputs);

        Aggregator aggregator = createAggregator(definition, Step.PARTIAL);
        aggregator.addValue(input);

        return new Page(aggregator.getResult());
View Full Code Here

TOP

Related Classes of com.facebook.presto.operator.AggregationFunctionDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.