snuyanzin commented on code in PR #29697:
URL: https://github.com/apache/flink/pull/29697#discussion_r4436576408
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalMultiJoin.java:
##########
@@ -247,6 +247,25 @@ public int[] getJoinKeyIndices(int inputId) {
return keyExtractor.getJoinKeyIndices(inputId);
}
+ /**
+ * Returns the columns that the equi-join conditions of the given input
reference in the inputs
+ * before it, as indices into the row that joins those inputs. The input's
own columns of these
+ * conditions are returned by {@link #getJoinKeyIndices(int)}.
+ */
+ public int[] getLeftJoinKeyIndices(int inputId) {
+ final List<ConditionAttributeRef> attributes =
joinAttributeMap.get(inputId);
+ if (inputId == 0 || attributes == null) {
+ return new int[0];
+ }
+ final int[] offsets = new int[inputId];
+ for (int i = 1; i < inputId; i++) {
+ offsets[i] = offsets[i - 1] + inputs.get(i -
1).getRowType().getFieldCount();
+ }
Review Comment:
do we have a test covering this?
--
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]