The rule PruneEmptyRules#JOIN_RIGHT_INSTANCE "converts a Join to empty if its right child is empty", e.g.
The rule verifies that the join type cannot be LEFT / FULL, and the transformation is not performed in those cases:
However in case of ANTI, it performs the transformation:
but this transformation is wrong for anti-join, in this case the actual result should be:
in case of anti equi-join (in case of non-equi, no transformation shall be made).