Class PushProjectionThroughExchange

  • All Implemented Interfaces:
    Rule<ProjectNode>

    public class PushProjectionThroughExchange
    extends Object
    implements Rule<ProjectNode>
    Transforms:
      Project(x = e1, y = e2)
        Exchange()
          Source(a, b, c)
      
    to:
      Exchange()
        Project(x = e1, y = e2)
          Source(a, b, c)
      
    Or if Exchange needs symbols from Source for partitioning, ordering or as hash symbol to:
      Project(x, y)
        Exchange()
          Project(x = e1, y = e2, a)
            Source(a, b, c)
      
    To avoid looping this optimizer will not be fired if upper Project contains just symbol references.