Class PushTopNThroughOuterJoin

  • All Implemented Interfaces:
    Rule<TopNNode>

    public class PushTopNThroughOuterJoin
    extends Object
    implements Rule<TopNNode>
    Transforms:
     - TopN (partial)
        - Join (left, right)
           - left source
           - right source
     
    Into:
     - Join
        - TopN (present if Join is left, not already limited, and orderBy symbols come from left source)
           - left source
        - TopN (present if Join is right, not already limited, and orderBy symbols come from right source)
           - right source
     

    TODO: this Rule violates the expectation that Rule transformations must preserve the semantics of the expression subtree. It works only because it's a PARTIAL TopN, so there will be a FINAL TopN that "fixes" it.