Package org.voltdb.plannodes

Examples of org.voltdb.plannodes.ReceivePlanNode


        }
        assert (clone_node != null);
       
        // But this means we have to also update the RECEIVE to only expect the
        // columns that the AggregateNode will be sending along
        ReceivePlanNode recv_node = null;
        if (clone_node instanceof DistinctPlanNode) {
            recv_node = (ReceivePlanNode) node.getChild(0).getChild(0);
        } else {
            recv_node = (ReceivePlanNode) node.getChild(0);
        }
        recv_node.getOutputColumnGUIDs().clear();
        recv_node.getOutputColumnGUIDs().addAll(clone_node.getOutputColumnGUIDs());
        state.markDirty(recv_node);

        assert (recv_node.getChild(0) instanceof SendPlanNode);
        SendPlanNode send_node = (SendPlanNode) recv_node.getChild(0);
        send_node.getOutputColumnGUIDs().clear();
        send_node.getOutputColumnGUIDs().addAll(clone_node.getOutputColumnGUIDs());
        send_node.addIntermediary(clone_node);
        state.markDirty(send_node);
View Full Code Here


        SendPlanNode sendNode = new SendPlanNode(m_context, PlanAssembler.getNextPlanNodeId());
        // this will make the child planfragment be sent to all partitions
        sendNode.isMultiPartition = true;
        sendNode.addAndLinkChild(scanNode);

        ReceivePlanNode recvNode = new ReceivePlanNode(m_context, PlanAssembler.getNextPlanNodeId());
        recvNode.addAndLinkChild(sendNode);

        // receive node requires the schema of its output table
        recvNode.updateOutputColumns(m_db);
        return recvNode;
    }
View Full Code Here

            AbstractPlanNode currentNode,
            List<CompiledPlan.Fragment> fragments) {

        // the place to split is the send-recv node pairing
        if (currentNode instanceof ReceivePlanNode) {
            ReceivePlanNode recvNode = (ReceivePlanNode) currentNode;
            assert(recvNode.getChildPlanNodeCount() == 1);
            AbstractPlanNode childNode = recvNode.getChild(0);
            assert(childNode instanceof SendPlanNode);
            SendPlanNode sendNode = (SendPlanNode) childNode;

            // disconnect the send and receive nodes
            sendNode.clearParents();
            recvNode.clearChildren();

            // make a new plan fragment rooted at the send
            CompiledPlan.Fragment subFrag = new CompiledPlan.Fragment();

            // put the multipartition hint from planning in the metadata
View Full Code Here

            assert (join_node.getChildPlanNodeCount() >= 1);
            AbstractPlanNode child = join_node.getChild(0);
            if (debug.val)
                LOG.debug(join_node + " -> " + child);
            if (child instanceof ReceivePlanNode) {
                ReceivePlanNode recv_node = (ReceivePlanNode) child;
                SendPlanNode send_node = (SendPlanNode) child.getChild(0);
                List<AbstractPlanNode> children = send_node.getChildren();
                assert (children != null);
                if (children.size() > 1)
                    continue;
View Full Code Here

            //
            // put the delete node in the right place
            //

            // get the recv node
            ReceivePlanNode recvNode = (ReceivePlanNode) subSelectRoot;
            // get the send node
            assert (recvNode.getChildPlanNodeCount() == 1);
            AbstractPlanNode sendNode = recvNode.getChild(0);

            // get the scan node and unlink
            assert (sendNode.getChildPlanNodeCount() == 1);
            AbstractPlanNode scanNode = sendNode.getChild(0);
            sendNode.unlinkChild(scanNode);

            // link in the delete node
            assert (scanNode instanceof AbstractScanPlanNode);
            scanNode.addInlinePlanNode(projectionNode);
            deleteNode.addAndLinkChild(scanNode);

            AbstractPlanNode combineNode = insertCountInDMLPlan(deleteNode);
            sendNode.addAndLinkChild(combineNode);

            // fix the receive node's output columns
            recvNode.updateOutputColumns(m_catalogDb);
            /*
             * recvNode.getOutputColumnNames().clear();
             * recvNode.getOutputColumnSizes().clear();
             * recvNode.getOutputColumnTypes().clear(); for (OutputColumnInfo
             * oci : recvNode.getOutputColumnGUIDs()) {
View Full Code Here

            //
            // put the update node in the right place
            //

            // get the recv node
            ReceivePlanNode recvNode = (ReceivePlanNode) subSelectRoot;
            // get the send node
            assert (recvNode.getChildPlanNodeCount() == 1);
            AbstractPlanNode sendNode = recvNode.getChild(0);

            // get the scan node and unlink
            assert (sendNode.getChildPlanNodeCount() == 1);
            AbstractPlanNode scanNode = sendNode.getChild(0);
            sendNode.unlinkChild(scanNode);

            // link in the update node
            assert (scanNode instanceof AbstractScanPlanNode);
            scanNode.addInlinePlanNode(projectionNode);
            updateNode.addAndLinkChild(scanNode);

            AbstractPlanNode countNode = insertCountInDMLPlan(updateNode);
            sendNode.addAndLinkChild(countNode);

            // fix the receive node's output columns
            recvNode.updateOutputColumns(m_catalogDb);
            /*
             * recvNode.getOutputColumnNames().clear();
             * recvNode.getOutputColumnSizes().clear();
             * recvNode.getOutputColumnTypes().clear(); for (OutputColumnInfo
             * oci : recvNode.getOutputColumnGUIDs()) {
View Full Code Here

            SendPlanNode sendNode = new SendPlanNode(m_context, getNextPlanNodeId());
            // this will make the child planfragment be sent to all partitions
            sendNode.isMultiPartition = true;
            sendNode.addAndLinkChild(rootNode);

            ReceivePlanNode recvNode = new ReceivePlanNode(m_context, getNextPlanNodeId());
            recvNode.addAndLinkChild(sendNode);
            rootNode = recvNode;

            // receive node requires the schema of its output table
            recvNode.updateOutputColumns(m_catalogDb);

            // add a count and send on top of the union
            rootNode = addSumAndSendToDMLNode(rootNode, targetTable.getIsreplicated());
           
        } else if (INCLUDE_SEND_FOR_ALL) {
View Full Code Here

                    + "Consider simplifying its subqueries: " + getOriginalSql();
            return null;
        }

        if (receives.size() == 1) {
            ReceivePlanNode recvNode = (ReceivePlanNode) receives.get(0);
            fragmentize(bestPlan, recvNode);
        }
        return bestPlan;
    }
View Full Code Here

     */
    protected static AbstractPlanNode addSendReceivePair(AbstractPlanNode scanNode) {
        SendPlanNode sendNode = new SendPlanNode();
        sendNode.addAndLinkChild(scanNode);

        ReceivePlanNode recvNode = new ReceivePlanNode();
        recvNode.addAndLinkChild(sendNode);

        return recvNode;
    }
View Full Code Here

TOP

Related Classes of org.voltdb.plannodes.ReceivePlanNode

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.