// If either table is replicated, then the leaf scan should be linked
// directly with the Join PlanNode
if (join_tbl.getIsreplicated() || leaf_tbl.getIsreplicated()) {
AbstractPlanNode parent = join_node.getParent(0);
assert (parent != null);
parent.clearChildren();
parent.addAndLinkChild(recv_node);
state.markDirty(parent);
state.markDirty(recv_node);
join_node.clearParents();