Class PushDownDereferenceThroughJoin

java.lang.Object
io.trino.sql.planner.iterative.rule.PushDownDereferenceThroughJoin
All Implemented Interfaces:
Rule<ProjectNode>

public class PushDownDereferenceThroughJoin extends Object implements Rule<ProjectNode>
Transforms:
  Project(A_X := f1(A.x), G := f2(A_Y.z), E := f3(B))
    Join(A_Y = C_Y) => [A, B]
      Project(A_Y := A.y, A, B)
          Source(A, B)
      Project(C_Y := C.y)
          Source(C, D)
  
to:
  Project(A_X := f1(symbol), G := f2(A_Y.z), E := f3(B))
    Join(A_Y = C_Y) => [symbol, B]
      Project(symbol := A.x, A_Y := A.y, A, B)
        Source(A, B)
      Project(C_Y := C.y)
        Source(C, D)
 

Pushes down dereference projections through JoinNode. Excludes dereferences on symbols being used in join criteria to avoid data replication, since these symbols cannot be pruned.