public SubPlanBuilder visitOutput(OutputNode node, Void context)
{
SubPlanBuilder current = node.getSource().accept(this, context);
if (current.isDistributed()) {
current.setRoot(new SinkNode(idAllocator.getNextId(), current.getRoot(), current.getRoot().getOutputSymbols()));
// create a new non-partitioned fragment
current = createSingleNodePlan(new ExchangeNode(idAllocator.getNextId(), current.getId(), current.getRoot().getOutputSymbols()))
.addChild(current.build());
}