Package com.facebook.presto.util

Examples of com.facebook.presto.util.MaterializedResult$Builder


                Optional.<Integer>absent(),
                false);

        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(driverContext.getSession(), BIGINT, DOUBLE)
                .row(-1, -0.1)
                .row(1, 0.1)
                .build();

        assertOperatorEquals(operator, input, expected);
View Full Code Here


                ImmutableList.copyOf(new SortOrder[] {SortOrder.ASC_NULLS_LAST}),
                10);

        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(driverContext.getSession(), DOUBLE, BIGINT, BIGINT)
                .row(-0.1, -1, 1)
                .row(0.3, 2, 2)
                .row(0.2, 4, 3)
                .row(0.4, 5, 4)
                .row(0.1, 6, 5)
View Full Code Here

                ImmutableList.copyOf(new SortOrder[] {SortOrder.ASC_NULLS_LAST}),
                10);

        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(driverContext.getSession(), VARCHAR, BIGINT, DOUBLE, BOOLEAN, BIGINT)
                .row("a", 2, 0.3, false, 1)
                .row("a", 4, 0.2, true, 2)
                .row("a", 6, 0.1, true, 3)
                .row("b", -1, -0.1, true, 1)
                .row("b", 5, 0.4, false, 2)
View Full Code Here

                Ints.asList(),
                ImmutableList.copyOf(new SortOrder[] {}),
                10);
        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(driverContext.getSession(), BIGINT, BIGINT)
                .row(1, 1)
                .row(3, 2)
                .row(5, 3)
                .row(7, 4)
                .row(2, 5)
View Full Code Here

                .build();

        OperatorFactory operatorFactory = new DistinctLimitOperator.DistinctLimitOperatorFactory(0, ImmutableList.of(BIGINT), 5);
        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(driverContext.getSession(), BIGINT)
                .row(1)
                .row(2)
                .row(3)
                .row(4)
                .row(5)
View Full Code Here

                .build();

        OperatorFactory operatorFactory = new DistinctLimitOperator.DistinctLimitOperatorFactory(0, ImmutableList.of(BIGINT), 3);
        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(driverContext.getSession(), BIGINT)
                .row(1)
                .row(2)
                .row(3)
                .build();
View Full Code Here

                .build();

        OperatorFactory operatorFactory = new DistinctLimitOperator.DistinctLimitOperatorFactory(0, ImmutableList.of(BIGINT), 5);
        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(driverContext.getSession(), BIGINT)
                .row(1)
                .row(2)
                .row(3)
                .row(4)
                .build();
View Full Code Here

        input = appendSampleWeight(input, 0);

        OperatorFactory operatorFactory = new MaterializeSampleOperatorFactory(0, ImmutableList.of(BIGINT), 1);
        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(driverContext.getSession(), BIGINT)
                .build();

        OperatorAssertion.assertOperatorEqualsIgnoreOrder(operator, input, expected);
    }
View Full Code Here

        List<Page> expectedPages = rowPagesBuilder(BIGINT)
                .addSequencePage(100, 1)
                .addSequencePage(100, 1)
                .build();

        MaterializedResult expected = resultBuilder(driverContext.getSession(), BIGINT)
                .pages(expectedPages)
                .build();

        OperatorAssertion.assertOperatorEqualsIgnoreOrder(operator, input, expected);
    }
View Full Code Here

                ImmutableList.of(0),
                ImmutableList.of(ASC_NULLS_LAST));

        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(driverContext.getSession(), DOUBLE)
                .row(-0.1)
                .row(0.1)
                .row(0.2)
                .row(0.4)
                .build();
View Full Code Here

TOP

Related Classes of com.facebook.presto.util.MaterializedResult$Builder

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.