Package com.facebook.presto.tuple

Examples of com.facebook.presto.tuple.TupleInfo$Builder


                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row("a", "a")
                .row("b", "b")
                .build();
View Full Code Here


                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row("a", "a")
                .row("b", "b")
                .build();
View Full Code Here

                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row("a", "a")
                .row("b", "b")
                .build();
View Full Code Here

                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, FIXED_INT_64, FIXED_INT_64, VARIABLE_BINARY, FIXED_INT_64, FIXED_INT_64))
                .row("20", 1020, 2020, "20", 30, 40)
                .row("21", 1021, 2021, "21", 31, 41)
                .row("22", 1022, 2022, "22", 32, 42)
                .row("23", 1023, 2023, "23", 33, 43)
                .row("24", 1024, 2024, "24", 34, 44)
View Full Code Here

                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row(null, null)
                .row(null, null)
                .row("a", "a")
                .row("b", "b")
View Full Code Here

                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row("a", "a")
                .row("b", "b")
                .row("c", null)
                .build();
View Full Code Here

                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row("a", "a")
                .row("b", "b")
                .row(null, null)
                .row("c", null)
View Full Code Here

    public static Page createSequencePage(List<TupleInfo> tupleInfos1, int length, int... initialValues)
    {
        Block[] blocks = new Block[initialValues.length];
        for (int i = 0; i < blocks.length; i++) {
            TupleInfo tupleInfo = tupleInfos1.get(i);
            int initialValue = initialValues[i];

            if (tupleInfo.equals(SINGLE_LONG)) {
                blocks[i] = BlockAssertions.createLongSequenceBlock(initialValue, initialValue + length);
            }
            else if (tupleInfo.equals(SINGLE_DOUBLE)) {
                blocks[i] = BlockAssertions.createDoubleSequenceBlock(initialValue, initialValue + length);
            }
            else if (tupleInfo.equals(SINGLE_VARBINARY)) {
                blocks[i] = BlockAssertions.createStringSequenceBlock(initialValue, initialValue + length);
            }
            else if (tupleInfo.equals(COMPOSITE_SEQUENCE_TUPLE_INFO)) {
                blocks[i] = BlockAssertions.createCompositeTupleSequenceBlock(initialValue, initialValue + length);
            }
            else {
                throw new IllegalStateException("Unsupported tuple info " + tupleInfo);
            }
View Full Code Here

    @Test
    public void testMultiFieldKey()
            throws Exception
    {
        TupleInfo tupleInfo = new TupleInfo(VARIABLE_BINARY, FIXED_INT_64);
        List<Page> input = rowPagesBuilder(tupleInfo)
                .row("a", 1)
                .row("b", 2)
                .pageBreak()
                .row("f", 3)
View Full Code Here

    @Test
    public void testRowNumberPartition()
            throws Exception
    {
        TupleInfo sourceTupleInfo = new TupleInfo(VARIABLE_BINARY, FIXED_INT_64, DOUBLE, BOOLEAN);

        List<Page> input = rowPagesBuilder(sourceTupleInfo)
                .row("b", -1, -0.1, true)
                .row("a", 2, 0.3, false)
                .row("a", 4, 0.2, true)
View Full Code Here

TOP

Related Classes of com.facebook.presto.tuple.TupleInfo$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.