break;
}
}
}
if (createSingleNodePlan || alreadyPartitioned || !current.isDistributed()) {
MarkDistinctNode markNode = new MarkDistinctNode(idAllocator.getNextId(), current.getRoot(), node.getMarkerSymbol(), node.getDistinctSymbols(), node.getSampleWeightSymbol());
current.setRoot(markNode);
return current;
}
else {
PlanNode sink = new SinkNode(idAllocator.getNextId(), current.getRoot(), current.getRoot().getOutputSymbols());
current.setRoot(sink)
.setHashOutputPartitioning(node.getDistinctSymbols());
PlanNode exchange = new ExchangeNode(idAllocator.getNextId(), current.getId(), sink.getOutputSymbols());
MarkDistinctNode markNode = new MarkDistinctNode(idAllocator.getNextId(), exchange, node.getMarkerSymbol(), node.getDistinctSymbols(), node.getSampleWeightSymbol());
return createFixedDistributionPlan(markNode)
.addChild(current.build());
}
}