TupleExpr leftArg = join.getLeftArg();
TupleExpr rightArg = join.getRightArg();
if (leftArg instanceof EmptySet || rightArg instanceof EmptySet) {
join.replaceWith(new EmptySet());
}
else if (leftArg instanceof SingletonSet) {
join.replaceWith(rightArg);
}
else if (rightArg instanceof SingletonSet) {