Examples of TupleInfo


Examples of com.facebook.presto.tuple.TupleInfo

        extends AbstractTestBlockCursor
{
    @Override
    protected Block createExpectedValues()
    {
        return new BlockBuilder(new TupleInfo(VARIABLE_BINARY, FIXED_INT_64))
                .append("apple")
                .append(11)
                .append("apple")
                .append(12)
                .append("apple")
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

        return builder.build();
    }

    public static BlockIterableBuilder blockIterableBuilder(Type... types)
    {
        return new BlockIterableBuilder(new TupleInfo(types));
    }
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

                .toString();
    }

    public static Builder resultBuilder(TupleInfo.Type... types)
    {
        return resultBuilder(new TupleInfo(types));
    }
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

    {
        ImmutableList.Builder<Type> types = ImmutableList.builder();
        for (TupleInfo sourceTupleInfo : checkNotNull(tupleInfos, "sourceTupleInfos is null")) {
            types.addAll(sourceTupleInfo.getTypes());
        }
        return new Builder(new TupleInfo(types.build()));
    }
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

                DUAL_METADATA_MANAGER,
                new Session("user", "test", Session.DEFAULT_CATALOG, Session.DEFAULT_SCHEMA, null, null)
        );

        // create output
        BlockBuilder builder = new BlockBuilder(new TupleInfo(outputType.getRawType()));

        // project
        projectionFunction.project(channels, builder);

        // extract single value
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

                    .transform(new Function<TupleInfo.Type, TupleInfo>()
                    {
                        @Override
                        public TupleInfo apply(TupleInfo.Type input)
                        {
                            return new TupleInfo(input);
                        }
                    })
                    .list());
        }
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

                .transform(new Function<TupleInfo.Type, TupleInfo>()
                {
                    @Override
                    public TupleInfo apply(TupleInfo.Type input)
                    {
                        return new TupleInfo(input);
                    }
                })
                .list());
    }
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

                DUAL_METADATA_MANAGER,
                new Session("user", "test", Session.DEFAULT_CATALOG, Session.DEFAULT_SCHEMA, null, null)
        );

        // create output
        BlockBuilder builder = new BlockBuilder(new TupleInfo(outputType.getRawType()));

        // project
        projectionFunction.project(channels, builder);

        // extract single value
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

        assertCurrentValue(cursor, position, tuple);
    }

    public static void assertCurrentValue(BlockCursor cursor, int position, Tuple tuple)
    {
        TupleInfo tupleInfo = tuple.getTupleInfo();
        assertEquals(cursor.getTupleInfo(), tupleInfo);

        assertEquals(cursor.getTuple(), tuple);
        assertEquals(cursor.getPosition(), position);
        assertTrue(cursor.currentTupleEquals(tuple));

        assertEquals(cursor.isNull(), tuple.isNull());
        switch (tupleInfo.getType()) {
            case BOOLEAN:
                assertEquals(cursor.getBoolean(), tuple.getBoolean());
                try {
                    cursor.getSlice();
                    fail("Expected IllegalStateException or UnsupportedOperationException");
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

        }

        @Override
        public TupleInfo getTupleInfo()
        {
            return new TupleInfo(fieldType);
        }
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.