Examples of TupleInfo


Examples of com.facebook.presto.tuple.TupleInfo

        public Iterator<Page> build()
        {
            List<Type> types = groupByHash.getTypes();
            ImmutableList.Builder<TupleInfo> tupleInfos = ImmutableList.builder();
            for (Type type : types) {
                tupleInfos.add(new TupleInfo(type));
            }
            for (Aggregator aggregator : aggregators) {
                tupleInfos.add(aggregator.getTupleInfo());
            }
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

        BlockCursor[] cursors = new BlockCursor[page.getChannelCount()];
        Type[] types = new Type[page.getChannelCount()];

        for (int channel = 0; channel < cursors.length; channel++) {
            cursors[channel] = page.getBlock(channel).cursor();
            TupleInfo tupleInfo = cursors[channel].getTupleInfo();
            types[channel] = tupleInfo.getType();
        }

        int rows = page.getPositionCount();
        for (int position = 0; position < rows; position++) {
            recordSink.beginRecord();
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

                .transform(new Function<Type, TupleInfo>()
                {
                    @Override
                    public TupleInfo apply(Type input)
                    {
                        return new TupleInfo(input);
                    }
                })
                .list());
        fieldNames = (fragment.getRoot() instanceof OutputNode) ?
                Optional.<List<String>>of(ImmutableList.copyOf(((OutputNode) fragment.getRoot()).getColumnNames())) :
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

        ClientSession session = new ClientSession(coordinator.getBaseUrl(), "testuser", "test", "default", "default", true);

        try (StatementClient client = new StatementClient(httpClient, queryResultsCodec, session, sql)) {
            AtomicBoolean loggedUri = new AtomicBoolean(false);
            ImmutableList.Builder<Tuple> rows = ImmutableList.builder();
            TupleInfo tupleInfo = null;

            while (client.isValid()) {
                QueryResults results = client.current();
                if (!loggedUri.getAndSet(true)) {
                    log.info("Query %s: %s?pretty", results.getId(), results.getInfoUri());
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

        }
    }

    private static TupleInfo getTupleInfo(List<Column> columns)
    {
        return new TupleInfo(transform(transform(columns, Column.typeGetter()), tupleType()));
    }
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();

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

Examples of com.facebook.presto.tuple.TupleInfo

        public Iterator<Page> build()
        {
            List<Type> types = groupByHash.getTypes();
            ImmutableList.Builder<TupleInfo> tupleInfos = ImmutableList.builder();
            for (Type type : types) {
                tupleInfos.add(new TupleInfo(type));
            }
            for (Aggregator aggregator : aggregators) {
                tupleInfos.add(aggregator.getTupleInfo());
            }
View Full Code Here

Examples of com.facebook.presto.tuple.TupleInfo

            Preconditions.checkNotNull(columnType, "columnType is null");
            Preconditions.checkArgument(channelIndex >= 0, "channelIndex is negative");

            this.columnType = columnType;
            this.channelIndex = channelIndex;
            this.info = new TupleInfo(columnType);
        }
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.