[
https://issues.apache.org/jira/browse/FLINK-38576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18039081#comment-18039081
]
Sergey Nuyanzin commented on FLINK-38576:
-----------------------------------------
Merged as
[bdbc8b589ee8e80580dade6496e61dc490af4585|https://github.com/apache/flink/commit/bdbc8b589ee8e80580dade6496e61dc490af4585]
> Align commonJoinKey in MultiJoin for logical and physical rules
> ---------------------------------------------------------------
>
> Key: FLINK-38576
> URL: https://issues.apache.org/jira/browse/FLINK-38576
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / Planner
> Affects Versions: 2.1.0
> Reporter: Gustavo de Morais
> Assignee: Stepan Stepanishchev
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.3.0
>
>
> We currently have two algorithms for identifying the commonJoinKey for
> MultiJoins. In the logical rule, we check if nodes have at least one
> commonJoinKey and in the physical rule we calculate the commonJoinKey. This
> can lead to issues if the algorithms are implemented diverge like in the test
> below
> {code:java}
> @Test
> void testFourWayJoinNoCommonJoinKeyRelPlan2() {
> util.verifyRelPlan(
> "SELECT u.user_id_0, u.name, o.order_id, p.payment_id,
> s.location "
> + "FROM Users u "
> + "LEFT JOIN Orders o ON o.user_id_1 = u.user_id_0 "
> + "LEFT JOIN Payments p ON u.user_id_0 = p.user_id_2
> AND u.name = p.payment_id "
> + "LEFT JOIN Shipments s ON p.payment_id = s.location
> ");
> } {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)