Package io.crate.planner.node.dql

Examples of io.crate.planner.node.dql.CollectNode.projections()


        AggregationProjection aggregationProjection = new AggregationProjection();
        aggregationProjection.aggregations(Arrays.asList( // not a real use case, only for test convenience, sorry
                new Aggregation(maxInfo, Arrays.<Symbol>asList(new InputColumn(0)), Aggregation.Step.ITER, Aggregation.Step.FINAL),
                new Aggregation(maxInfo, Arrays.<Symbol>asList(new InputColumn(1)), Aggregation.Step.ITER, Aggregation.Step.PARTIAL)
        ));
        collectNode.projections(Arrays.<Projection>asList(aggregationProjection));
        PlanNodeStreamerVisitor.Context ctx = visitor.process(collectNode);
        Streamer<?>[] streamers = ctx.outputStreamers();
        assertThat(streamers.length, is(4));
        assertThat(streamers[0], instanceOf(DataTypes.BOOLEAN.streamer().getClass()));
        assertThat(streamers[1], instanceOf(DataTypes.INTEGER.streamer().getClass()));
View Full Code Here


        CollectNode node = new CollectNode("distributing collect", analysis.table().getRouting(analysis.whereClause()));
        node.whereClause(analysis.whereClause());
        node.maxRowGranularity(analysis.rowGranularity());
        node.downStreamNodes(downstreamNodes);
        node.toCollect(toCollect);
        node.projections(projections);

        node.isPartitioned(analysis.table().isPartitioned());
        setOutputTypes(node);
        return node;
    }
View Full Code Here

        }
        CollectNode node = new CollectNode("collect", routing);
        node.whereClause(analysis.whereClause());
        node.toCollect(toCollect);
        node.maxRowGranularity(analysis.rowGranularity());
        node.projections(projections);
        node.isPartitioned(analysis.table().isPartitioned());
        setOutputTypes(node);
        return node;
    }
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.