Examples of MaterializedResult


Examples of com.facebook.presto.testing.MaterializedResult

                        LONG_SUM.bind(ImmutableList.of(3), Optional.<Integer>absent(), Optional.<Integer>absent(), 1.0),
                        DOUBLE_SUM.bind(ImmutableList.of(4), Optional.<Integer>absent(), Optional.<Integer>absent(), 1.0),
                        VAR_BINARY_MAX.bind(ImmutableList.of(5), Optional.<Integer>absent(), Optional.<Integer>absent(), 1.0)));
        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(driverContext.getSession(), BIGINT, BIGINT, DOUBLE, VARCHAR, BIGINT, BIGINT, DOUBLE, VARCHAR)
                .row(100, 4950, 49.5, "399", 100, 54950, 54950.0, "599")
                .build();

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

Examples of com.facebook.presto.testing.MaterializedResult

                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

Examples of com.facebook.presto.testing.MaterializedResult

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

        Operator operator = operatorFactory.createOperator(driverContext);

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

Examples of com.facebook.presto.testing.MaterializedResult

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

        Operator operator = operatorFactory.createOperator(driverContext);

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

Examples of com.facebook.presto.testing.MaterializedResult

                probeTypes,
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(driverContext);

        // expected
        MaterializedResult expected = resultBuilder(driverContext.getSession(), concat(probeTypes, ImmutableList.of(BOOLEAN)))
                .row(30, 0, true)
                .row(31, 1, false)
                .row(32, 2, false)
                .row(33, 3, false)
                .row(34, 4, false)
View Full Code Here

Examples of com.facebook.presto.testing.MaterializedResult

                probeTypes,
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(driverContext);

        // expected
        MaterializedResult expected = resultBuilder(driverContext.getSession(), concat(probeTypes, ImmutableList.of(BOOLEAN)))
                .row(1, true)
                .row(2, true)
                .row(3, true)
                .row(4, null)
                .build();
View Full Code Here

Examples of com.facebook.presto.testing.MaterializedResult

                probeTypes,
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(driverContext);

        // expected
        MaterializedResult expected = resultBuilder(driverContext.getSession(), concat(probeTypes, ImmutableList.of(BOOLEAN)))
                .row(0, true)
                .row(null, null)
                .row(1, true)
                .row(2, false)
                .build();
View Full Code Here

Examples of com.facebook.presto.testing.MaterializedResult

                probeTypes,
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(driverContext);

        // expected
        MaterializedResult expected = resultBuilder(driverContext.getSession(), concat(probeTypes, ImmutableList.of(BOOLEAN)))
                .row(0, true)
                .row(null, null)
                .row(1, true)
                .row(2, null)
                .build();
View Full Code Here

Examples of com.facebook.presto.testing.MaterializedResult

                3,
                10);

        Operator operator = operatorFactory.createOperator(driverContext);

        MaterializedResult expected = resultBuilder(driverContext.getSession(), DOUBLE, BIGINT, BIGINT)
                .row(0.3, 1, 1)
                .row(0.4, 1, 2)
                .row(0.5, 1, 3)
                .row(0.2, 2, 1)
                .row(0.7, 2, 2)
View Full Code Here

Examples of com.facebook.presto.testing.MaterializedResult

    @Test
    public void testDescribeTable()
            throws Exception
    {
        MaterializedResult expected = MaterializedResult.resultBuilder(TEST_SESSION, VARCHAR, VARCHAR, BOOLEAN, BOOLEAN, VARCHAR)
                .row("regionkey", "bigint", true, false, "")
                .row("name", "varchar", true, false, "")
                .row("comment", "varchar", true, false, "")
                .build();
        assertEquals(runner.execute("DESC REGION"), expected);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.