Class RemoveEmptyUnionBranches

  • All Implemented Interfaces:
    Rule<UnionNode>

    public class RemoveEmptyUnionBranches
    extends Object
    implements Rule<UnionNode>
    Removes branches from a UnionNode that are guaranteed to produce 0 rows. If there's only one branch left, it replaces the UnionNode with a projection to preserve the outputs of the union. If all branches are empty, it replaces the UnionNode with an empty ValuesNode