@Override public PlanNode replaceChildren(List<PlanNode> newChildren) { checkArgument(newChildren.size() == 1, "expected newChildren to contain 1 node"); return new AssignUniqueId(getId(), Iterables.getOnlyElement(newChildren), idColumn); } }
public AssignUniqueId assignUniqueId(Symbol unique, PlanNode source) { return new AssignUniqueId(idAllocator.getNextId(), source, unique); }
@Override public PlanNode visitAssignUniqueId(AssignUniqueId node, RewriteContext<Void> context) { PlanNode source = context.rewrite(node.getSource()); return new AssignUniqueId(node.getId(), source, node.getIdColumn()); }
Symbol nonNull) AssignUniqueId inputWithUniqueColumns = new AssignUniqueId( idAllocator.getNextId(), lateralJoinNode.getInput(),
@Override public Result apply(ExchangeNode node, Captures captures, Context context) { checkArgument(!node.getOrderingScheme().isPresent(), "Merge exchange over AssignUniqueId not supported"); AssignUniqueId assignUniqueId = captures.get(ASSIGN_UNIQUE_ID); PartitioningScheme partitioningScheme = node.getPartitioningScheme(); if (partitioningScheme.getPartitioning().getColumns().contains(assignUniqueId.getIdColumn())) { // The column produced by the AssignUniqueId is used in the partitioning scheme of the exchange. // Hence, AssignUniqueId node has to stay below the exchange node. return Result.empty(); } return Result.ofPlanNode(new AssignUniqueId( assignUniqueId.getId(), new ExchangeNode( node.getId(), node.getType(), node.getScope(), new PartitioningScheme( partitioningScheme.getPartitioning(), removeSymbol(partitioningScheme.getOutputLayout(), assignUniqueId.getIdColumn()), partitioningScheme.getHashColumn(), partitioningScheme.isReplicateNullsAndAny(), partitioningScheme.getBucketToPartition()), ImmutableList.of(assignUniqueId.getSource()), ImmutableList.of(removeSymbol(getOnlyElement(node.getInputs()), assignUniqueId.getIdColumn())), Optional.empty()), assignUniqueId.getIdColumn())); }
PlanNode decorrelatedBuildSource = decorrelated.getDecorrelatedNode(); AssignUniqueId probeSide = new AssignUniqueId( idAllocator.getNextId(), apply.getInput(),
new AssignUniqueId( context.getIdAllocator().getNextId(), lateralJoinNode.getInput(),