xuyangzhong commented on code in PR #27734:
URL: https://github.com/apache/flink/pull/27734#discussion_r2893529634
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/utils/DeltaJoinUtil.java:
##########
@@ -270,10 +279,543 @@ public static boolean isJoinTypeSupported(FlinkJoinType
flinkJoinType) {
}
/**
- * get the lookup key from the join keys.
+ * Try to build lookup chain for delta join to do lookup.
+ *
+ * <p>Take the follow join tree as example.
+ *
+ * <pre>{@code
+ * Top
+ * (Set1.a1 = Set2.c1 and Set1.b2 = Set2.d2)
Review Comment:
Considering that joins at different levels use different columns as join
keys, using the actual column names would be harder to understand. So here I
instead specify a simplified convention: each leaf table has columns named with
its lowercase letter plus a number, e.g., A(a0, a1), B(b0, b1, b2), C(c0, c1),
D(d0, d1, d2).
Do you think it would be easier to understand if I change it to the
following?
```
/**
* Try to build lookup chain for delta join to do lookup.
*
* <p>Take the following join tree as example. Each leaf table has
columns named with its
* lowercase letter and a number, e.g., A(a0, a1), B(b0, b1, b2), C(c0,
c1), D(d0, d1, d2).
*
* <pre>{@code
* Top
* (a1 = c1 and b2 = d2)
* / \
* Bottom1 Bottom2
* (a0 = b0) (c0 = d0)
* / \ / \
* A(a0,a1) B(b0,b1,b2) C(c0,c1) D(d0,d1,d2)
*
* }</pre>
*
* <p>If Bottom1 is treated as stream side and Bottom2 is treated as
lookup side, the lookup
* chain will be like this:
*
* <p>use A + B to lookup C with (a1 = c1) -> use C to lookup D with (c0
= d0).
*/
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]