Examples of executionNodes()


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

                table.getRouting(WhereClause.MATCH_ALL),
                ImmutableList.<Symbol>of(),
                Arrays.<Projection>asList(new AggregationProjection(ImmutableList.of(countAggregationPartial))));
        collectNode.maxRowGranularity(RowGranularity.DOC);
        collectNode.outputTypes(ImmutableList.<DataType>of(DataTypes.UNDEFINED));
        MergeNode mergeNode = new MergeNode("local count merge", collectNode.executionNodes().size());
        mergeNode.projections(ImmutableList.<Projection>of(new AggregationProjection(ImmutableList.of(countAggregationFinal))));
        Plan plan = new Plan();
        plan.add(collectNode);
        plan.add(mergeNode);
        return plan;
View Full Code Here

Examples of io.crate.planner.node.dql.FileUriCollectNode.executionNodes()

                                        FlatProjectorChain projectorChain) throws Exception {
        if (collectNode instanceof FileUriCollectNode) {
            FileCollectInputSymbolVisitor.Context context = fileInputSymbolVisitor.process(collectNode);
            FileUriCollectNode fileUriCollectNode = (FileUriCollectNode) collectNode;

            String[] readers = fileUriCollectNode.executionNodes().toArray(
                    new String[fileUriCollectNode.executionNodes().size()]);
            Arrays.sort(readers);
            return new FileReadingCollector(
                    StringValueSymbolVisitor.INSTANCE.process(fileUriCollectNode.targetUri()),
                    context.topLevelInputs(),
View Full Code Here

Examples of io.crate.planner.node.dql.FileUriCollectNode.executionNodes()

        if (collectNode instanceof FileUriCollectNode) {
            FileCollectInputSymbolVisitor.Context context = fileInputSymbolVisitor.process(collectNode);
            FileUriCollectNode fileUriCollectNode = (FileUriCollectNode) collectNode;

            String[] readers = fileUriCollectNode.executionNodes().toArray(
                    new String[fileUriCollectNode.executionNodes().size()]);
            Arrays.sort(readers);
            return new FileReadingCollector(
                    StringValueSymbolVisitor.INSTANCE.process(fileUriCollectNode.targetUri()),
                    context.topLevelInputs(),
                    context.expressions(),
View Full Code Here

Examples of io.crate.planner.node.dql.MergeNode.executionNodes()

        }

        // select count(*), user ... group by user
        MergeNode mergeNode = new MergeNode("merge1", 2);
        mergeNode.contextId(UUID.randomUUID());
        mergeNode.executionNodes(nodes);
        mergeNode.inputTypes(Arrays.<DataType>asList(DataTypes.UNDEFINED, DataTypes.STRING));

        GroupProjection groupProjection = new GroupProjection();
        groupProjection.keys(Arrays.<DataTypeSymbol>asList(new InputColumn(1, DataTypes.STRING)));
        groupProjection.values(Arrays.asList(
View Full Code Here

Examples of io.crate.planner.node.dql.MergeNode.executionNodes()

    @Test
    public void testSerialization() throws Exception {
        MergeNode node = new MergeNode("merge", 2);
        node.contextId(UUID.randomUUID());
        node.executionNodes(Sets.newHashSet("node1", "node2"));
        node.inputTypes(Arrays.<DataType>asList(DataTypes.UNDEFINED, DataTypes.STRING));

        Reference nameRef = TestingHelpers.createReference("name", DataTypes.STRING);
        GroupProjection groupProjection = new GroupProjection();
        groupProjection.keys(Arrays.<DataTypeSymbol>asList(nameRef));
View Full Code Here

Examples of io.crate.planner.node.dql.MergeNode.executionNodes()

        BytesStreamInput input = new BytesStreamInput(output.bytes());
        MergeNode node2 = new MergeNode();
        node2.readFrom(input);

        assertThat(node.numUpstreams(), is(node2.numUpstreams()));
        assertThat(node.executionNodes(), is(node2.executionNodes()));
        assertThat(node.contextId(), is(node2.contextId()));
        assertThat(node.inputTypes(), is(node2.inputTypes()));
    }
}
View Full Code Here

Examples of io.crate.planner.node.dql.MergeNode.executionNodes()

                                      ImmutableList<Projection> projections) {
        MergeNode node = new MergeNode("distributed merge", collectNode.executionNodes().size());
        node.projections(projections);

        assert collectNode.downStreamNodes()!=null && collectNode.downStreamNodes().size()>0;
        node.executionNodes(ImmutableSet.copyOf(collectNode.downStreamNodes()));
        connectTypes(collectNode, node);
        return node;
    }

    static MergeNode localMerge(List<Projection> projections,
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.