Package com.facebook.presto.tuple

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


        this.operatorContext = checkNotNull(operatorContext, "operatorContext is null");
        this.cursor = checkNotNull(cursor, "cursor is null");

        ImmutableList.Builder<TupleInfo> tupleInfos = ImmutableList.builder();
        for (ColumnType columnType : columnTypes) {
            tupleInfos.add(new TupleInfo(Type.fromColumnType(columnType)));
        }
        this.tupleInfos = tupleInfos.build();

        pageBuilder = new PageBuilder(this.tupleInfos);
    }
View Full Code Here


        List<TupleInfo> tupleInfos = new ArrayList<>();
        int projectionIndex = 0;
        for (int i = 0; i < projections.size(); i++) {
            Type outputType = outputTypes.get(i);
            checkArgument(outputType != Type.NULL, "NULL output type is not supported");
            tupleInfos.add(new TupleInfo(outputType.getRawType()));

            // verify the compiled projection has the correct type
            Expression projection = projections.get(i);

            Class<?> type = generateProjectMethod(classDefinition, "project_" + projectionIndex, projection, inputTypes, true);
View Full Code Here

        List<TupleInfo> tupleInfos = new ArrayList<>();
        int projectionIndex = 0;
        for (int i = 0; i < projections.size(); i++) {
            Type outputType = outputTypes.get(i);
            checkArgument(outputType != Type.NULL, "NULL output type is not supported");
            tupleInfos.add(new TupleInfo(outputType.getRawType()));

            // verify the compiled projection has the correct type
            Expression projection = projections.get(i);

            Class<?> type = generateProjectMethod(classDefinition, "project_" + projectionIndex, projection, inputTypes, true);
View Full Code Here

        public UncompressedBlock build()
        {
            checkState(!positionOffsets.isEmpty(), "Cannot build an empty block");

            return new UncompressedBlock(positionOffsets.size(), new TupleInfo(type), sliceOutput.slice());
        }
View Full Code Here

            for (Symbol symbol : node.getOutputSymbols()) {
                Input input = new Input(channel);
                outputMappings.put(symbol, input);

                Type type = checkNotNull(context.getTypes().get(symbol), "No type for symbol %s", symbol);
                outputTypes.add(new TupleInfo(type.getRawType()));

                channel++;
            }

            PageBuilder pageBuilder = new PageBuilder(outputTypes);
View Full Code Here

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

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

        ImmutableList.Builder<PlanNode> sources = ImmutableList.builder();
View Full Code Here

    private static List<TupleInfo> toTupleInfos(List<ColumnType> columnTypes)
    {
        ImmutableList.Builder<TupleInfo> tupleInfos = ImmutableList.builder();
        for (ColumnType columnType : columnTypes) {
            tupleInfos.add(new TupleInfo(fromColumnType(columnType)));
        }
        return tupleInfos.build();
    }
View Full Code Here

    {
    }

    public static BlockIterable createBlockIterable(Block firstBlock, Block... otherBlocks)
    {
        TupleInfo tupleInfo = firstBlock.getTupleInfo();
        return new StaticBlockIterable(tupleInfo, ImmutableList.<Block>builder().add(firstBlock).add(otherBlocks).build());
    }
View Full Code Here

        return new StaticBlockIterable(tupleInfo, ImmutableList.<Block>builder().add(firstBlock).add(otherBlocks).build());
    }

    public static BlockIterable createBlockIterable(Iterable<? extends Block> blocks)
    {
        TupleInfo tupleInfo = Iterables.get(blocks, 0).getTupleInfo();
        return new StaticBlockIterable(tupleInfo, ImmutableList.copyOf(blocks));
    }
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.