Join conditions are also pulled up from the inputs into the topmost {@link MultiJoinRel}, unless the input corresponds to a null generating input in an outer join,
Outer join information is also stored in the {@link MultiJoinRel}. A boolean flag indicates if the join is a full outer join, and in the case of left and right outer joins, the join type and outer join conditions are stored in arrays in the {@link MultiJoinRel}. This outer join information is associated with the null generating input in the outer join. So, in the case of a a left outer join between A and B, the information is associated with B, not A.
Here are examples of the {@link MultiJoinRel}s constructed after this rule has been applied on following join trees.
A JOIN B → MJ(A, B) A JOIN B JOIN C → MJ(A, B, C) A LEFTOUTER B → MJ(A, B), left outer join on input#1 A RIGHTOUTER B → MJ(A, B), right outer join on input#0 A FULLOUTER B → MJ[full](A, B) A LEFTOUTER (B JOIN C) → MJ(A, MJ(B, C))), left outer join on input#1 in the outermost MultiJoinRel (A JOIN B) LEFTOUTER C → MJ(A, B, C), left outer join on input#2 A LEFTOUTER (B FULLOUTER C) → MJ(A, MJ[full](B, C)), left outer join on input#1 in the outermost MultiJoinRel (A LEFTOUTER B) FULLOUTER (C RIGHTOUTER D) → MJ[full](MJ(A, B), MJ(C, D)), left outer join on input #1 in the first inner MultiJoinRel and right outer join on input#0 in the second inner MultiJoinRel
|
|