Package com.facebook.presto.operator.WindowOperator

Examples of com.facebook.presto.operator.WindowOperator.InMemoryWindowOperatorFactory


            for (Symbol symbol : windowFunctionOutputSymbols) {
                outputMappings.put(symbol, new Input(channel, 0));
                channel++;
            }

            OperatorFactory operatorFactory = new InMemoryWindowOperatorFactory(
                    context.getNextOperatorId(),
                    source.getTupleInfos(),
                    orderByChannel,
                    outputChannels,
                    windowFunctions.build(),
View Full Code Here


                .pageBreak()
                .row(-1, -0.1)
                .row(5, 0.4)
                .build();

        InMemoryWindowOperatorFactory operatorFactory = new InMemoryWindowOperatorFactory(
                0,
                ImmutableList.of(SINGLE_LONG, SINGLE_DOUBLE),
                0,
                ints(1, 0),
                ROW_NUMBER,
                ints(),
                ints(0),
                bools(true),
                10);

        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(DOUBLE, FIXED_INT_64, FIXED_INT_64)
                .row(-0.1, -1, 1)
                .row(0.3, 2, 2)
                .row(0.2, 4, 3)
View Full Code Here

                .pageBreak()
                .row("b", 5, 0.4, false)
                .row("a", 6, 0.1, true)
                .build();

        InMemoryWindowOperatorFactory operatorFactory = new InMemoryWindowOperatorFactory(
                0,
                ImmutableList.of(sourceTupleInfo),
                0,
                ints(0),
                ROW_NUMBER,
                ints(0),
                ints(1),
                bools(true),
                10);

        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(VARIABLE_BINARY, FIXED_INT_64, DOUBLE, BOOLEAN, FIXED_INT_64)
                .row("a", 2, 0.3, false, 1)
                .row("a", 4, 0.2, true, 2)
                .row("a", 6, 0.1, true, 3)
View Full Code Here

                .row(4)
                .row(6)
                .row(8)
                .build();

        InMemoryWindowOperatorFactory operatorFactory = new InMemoryWindowOperatorFactory(
                0,
                ImmutableList.of(SINGLE_LONG),
                0,
                ints(0),
                ROW_NUMBER,
                ints(),
                ints(),
                bools(),
                10);
        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(FIXED_INT_64, FIXED_INT_64)
                .row(1, 1)
                .row(3, 2)
                .row(5, 3)
View Full Code Here

        Session session = new Session("user", "source", "catalog", "schema", "address", "agent");
        DriverContext driverContext = new TaskContext(new TaskId("query", "stage", "task"), executor, session, new DataSize(10, Unit.BYTE))
                .addPipelineContext(true, true)
                .addDriverContext();

        InMemoryWindowOperatorFactory operatorFactory = new InMemoryWindowOperatorFactory(
                0,
                ImmutableList.of(SINGLE_LONG, SINGLE_DOUBLE),
                0,
                ints(1),
                ROW_NUMBER,
                ints(),
                ints(0),
                bools(true),
                10);

        Operator operator = operatorFactory.createOperator(driverContext);

        toPages(operator, input);
    }
View Full Code Here

            for (Symbol symbol : windowFunctionOutputSymbols) {
                outputMappings.put(symbol, new Input(channel, 0));
                channel++;
            }

            OperatorFactory operatorFactory = new InMemoryWindowOperatorFactory(
                    context.getNextOperatorId(),
                    source.getTupleInfos(),
                    orderByChannel,
                    outputChannels,
                    windowFunctions.build(),
View Full Code Here

            for (Symbol symbol : windowFunctionOutputSymbols) {
                outputMappings.put(symbol, new Input(channel, 0));
                channel++;
            }

            OperatorFactory operatorFactory = new InMemoryWindowOperatorFactory(
                    context.getNextOperatorId(),
                    source.getTupleInfos(),
                    orderByChannel,
                    outputChannels,
                    windowFunctions.build(),
View Full Code Here

TOP

Related Classes of com.facebook.presto.operator.WindowOperator.InMemoryWindowOperatorFactory

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.