Examples of CollectNode


Examples of io.crate.planner.node.dql.CollectNode

    static CollectNode distributingCollect(AbstractDataAnalysis analysis,
                                           List<Symbol> toCollect,
                                           List<String> downstreamNodes,
                                           ImmutableList<Projection> projections) {
        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

Examples of io.crate.planner.node.dql.CollectNode

        Routing routing = analysis.table().getRouting(analysis.whereClause());
        if (partitionIdent != null && routing.hasLocations()) {
            routing = filterRouting(routing, PartitionName.fromPartitionIdent(
                            analysis.table().ident().name(), partitionIdent).stringValue());
        }
        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

Examples of io.crate.planner.node.dql.CollectNode

                CountAggregation.COUNT_STAR_FUNCTION,
                ImmutableList.<Symbol>of(new InputColumn(0, DataTypes.LONG)),
                Aggregation.Step.PARTIAL,
                Aggregation.Step.FINAL);

        CollectNode collectNode = new CollectNode(
                "count",
                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.CollectNode

     * @return collector wrapping different collect implementations, call {@link CrateCollector#doCollect()} to start
     * collecting with this collector
     */
    public CrateCollector getCollector(CollectNode collectNode,
                                       ShardProjectorChain projectorChain) throws Exception {
        CollectNode normalizedCollectNode = collectNode.normalize(shardNormalizer);
        Projector downstream = projectorChain.newShardDownstreamProjector(projectorVisitor);

        if (normalizedCollectNode.whereClause().noMatch()) {
            return CrateCollector.NOOP;
        } else {
            RowGranularity granularity = normalizedCollectNode.maxRowGranularity();
            if (granularity == RowGranularity.DOC) {
                if (isBlobShard) {
                    return getBlobIndexCollector(normalizedCollectNode, downstream);
                } else {
                    return getLuceneIndexCollector(normalizedCollectNode, downstream);
View Full Code Here

Examples of org.drools.reteoo.CollectNode

        if( ! context.getBehaviors().isEmpty() ) {
            behaviors = (Behavior[]) context.getBehaviors().toArray( new Behavior[ context.getBehaviors().size() ]);
        }

        context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
                                                                new CollectNode( context.getNextId(),
                                                                                 context.getTupleSource(),
                                                                                 context.getObjectSource(),
                                                                                 (AlphaNodeFieldConstraint[]) resultAlphaConstraints.toArray( new AlphaNodeFieldConstraint[resultAlphaConstraints.size()] ),
                                                                                 binder, // source binder
                                                                                 resultBinder,
View Full Code Here

Examples of org.drools.reteoo.CollectNode

        BetaConstraints binder = utils.createBetaNodeConstraint( context, context.getBetaconstraints(), false );
        // indexing for the results should be always disabled
        BetaConstraints resultBinder = utils.createBetaNodeConstraint( context, resultBetaConstraints, true );
       
        context.setTupleSource( (TupleSource) utils.attachNode( context,
                                                                new CollectNode( context.getNextId(),
                                                                                 context.getTupleSource(),
                                                                                 context.getObjectSource(),
                                                                                 (AlphaNodeFieldConstraint[]) resultAlphaConstraints.toArray( new AlphaNodeFieldConstraint[resultAlphaConstraints.size()] ),
                                                                                 binder, // source binder
                                                                                 resultBinder,
View Full Code Here

Examples of org.drools.reteoo.CollectNode

       
        BetaConstraints binder = utils.createBetaNodeConstraint( context, context.getBetaconstraints(), false );
        BetaConstraints resultBinder = utils.createBetaNodeConstraint( context, resultBetaConstraints, false );
       
        context.setTupleSource( (TupleSource) utils.attachNode( context,
                                                                new CollectNode( context.getNextId(),
                                                                                 context.getTupleSource(),
                                                                                 context.getObjectSource(),
                                                                                 (AlphaNodeFieldConstraint[]) resultAlphaConstraints.toArray( new AlphaNodeFieldConstraint[resultAlphaConstraints.size()] ),
                                                                                 binder, // source binder
                                                                                 resultBinder,
View Full Code Here

Examples of org.drools.reteoo.CollectNode

       
        BetaConstraints binder = utils.createBetaNodeConstraint( context, context.getBetaconstraints(), false );
        BetaConstraints resultBinder = utils.createBetaNodeConstraint( context, resultBetaConstraints, false );
       
        context.setTupleSource( (TupleSource) utils.attachNode( context,
                                                                new CollectNode( context.getNextId(),
                                                                                 context.getTupleSource(),
                                                                                 context.getObjectSource(),
                                                                                 (AlphaNodeFieldConstraint[]) resultAlphaConstraints.toArray( new AlphaNodeFieldConstraint[resultAlphaConstraints.size()] ),
                                                                                 binder, // source binder
                                                                                 resultBinder,
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.