Skip to content

Commit 5b546e7

Browse files
gustavodemoraisdawidwys
authored andcommitted
[FLINK-38211][table] Skip pos 0 for joinTypes and joinConditions
1 parent 2e44db6 commit 5b546e7

File tree

2 files changed

+45
-41
lines changed

2 files changed

+45
-41
lines changed

flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalMultiJoin.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,20 +166,16 @@ public RelWriter explainTerms(final RelWriter pw) {
166166
}
167167

168168
return pw.item("commonJoinKey", getCommonJoinKeyFieldNames())
169-
.item(
170-
"joinTypes",
171-
joinTypes.stream()
172-
.map(JoinRelType::toString)
173-
.collect(Collectors.joining(", ")))
169+
.item("joinTypes", formatJoinTypes())
174170
.item("inputUniqueKeys", formatInputUniqueKeysWithFieldNames())
171+
.itemIf("stateTtlHints", RelExplainUtil.hintsToString(hints), !hints.isEmpty())
175172
.item("joinConditions", formatJoinConditionsWithFieldNames(pw))
176173
.itemIf(
177174
"postJoinFilter",
178175
formatExpressionWithFieldNames(postJoinFilter, pw),
179176
postJoinFilter != null)
180177
.item("select", String.join(",", getRowType().getFieldNames()))
181-
.item("rowType", getRowType())
182-
.itemIf("stateTtlHints", RelExplainUtil.hintsToString(hints), !hints.isEmpty());
178+
.item("rowType", getRowType());
183179
}
184180

185181
@Override
@@ -338,11 +334,19 @@ private String formatExpressionWithFieldNames(final RexNode expression, final Re
338334
*/
339335
private String formatJoinConditionsWithFieldNames(final RelWriter pw) {
340336
return joinConditions.stream()
337+
.skip(1)
341338
.filter(Objects::nonNull)
342339
.map(condition -> formatExpressionWithFieldNames(condition, pw))
343340
.collect(Collectors.joining(", "));
344341
}
345342

343+
private String formatJoinTypes() {
344+
return joinTypes.stream()
345+
.skip(1)
346+
.map(JoinRelType::toString)
347+
.collect(Collectors.joining(", "));
348+
}
349+
346350
private String formatInputUniqueKeysWithFieldNames() {
347351
final List<String> inputUniqueKeyStrings = new ArrayList<>();
348352
for (final RelNode input : inputs) {

0 commit comments

Comments
 (0)