Class PushDownJoinPastProject


public final class PushDownJoinPastProject extends OptimizerRules.OptimizerRule<Join>
If a Project is found in the left child of a left Join, perform it after. Due to requiring the projected attributes later, field extractions can also happen later, making joins cheaper to execute on data nodes. E.g. ... | RENAME field AS otherfield | LOOKUP JOIN lu_idx ON key becomes ... | LOOKUP JOIN lu_idx ON key | RENAME field AS otherfield . When a LOOKUP JOIN's lookup fields shadow the previous fields, we need to leave an Eval in place of the Project to assign a temporary name. Assume that field is a lookup-added field, then ... | RENAME field AS otherfield | LOOKUP JOIN lu_idx ON key becomes something like ... | EVAL $$field = field | LOOKUP JOIN lu_idx ON key | RENAME $$field AS otherfield. Leaving EVAL $$field = field in place of the original projection, rather than a Project, avoids infinite loops.