}
else if (joinArg instanceof Join || distinct) {
// Local join with multiple owners or distinct federation members
Union union = new Union();
for (SignedConnection owner : owners) {
union.addArg(new OwnedTupleExpr(owner, joinArg.clone()));
}
replacement.addArg(union);
}
else {
replacement.addArg(joinArg);