Exemplo n.º 1
0
  private static void replacePlanForUpsert(CompiledPlan plan) {
    plan.rootPlanGraph = replaceInsertPlanNodeWithUpsert(plan.rootPlanGraph);
    plan.subPlanGraph = replaceInsertPlanNodeWithUpsert(plan.subPlanGraph);

    if (plan.explainedPlan != null) {
      plan.explainedPlan = plan.explainedPlan.replace("INSERT", "UPSERT");
    }
  }
Exemplo n.º 2
0
  private static void fragmentize(CompiledPlan plan, AbstractReceivePlanNode recvNode) {
    assert (recvNode.getChildCount() == 1);
    AbstractPlanNode childNode = recvNode.getChild(0);
    assert (childNode instanceof SendPlanNode);
    SendPlanNode sendNode = (SendPlanNode) childNode;

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

    plan.subPlanGraph = sendNode;
    return;
  }