Class PruneUnionColumns

  • All Implemented Interfaces:
    Rule<ProjectNode>

    public class PruneUnionColumns
    extends ProjectOffPushDownRule<UnionNode>
    Transforms
     - Project (a)
          - Union
            output mappings: {a->c, a->e, b->d, b->f}
              - Source (c, d)
              - Source (e, f)
     
    into:
     - Project (a)
          - Union
            output mappings: {a->c, a->e}
              - Source (c, d)
              - Source (e, f)
     
    Note: as a result of this rule, the UnionNode's sources are eligible for pruning outputs. This is accomplished by PruneUnionSourceColumns rule.