You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Sergey Nuyanzin (Jira)" <ji...@apache.org> on 2025/11/18 09:06:00 UTC

[jira] [Resolved] (FLINK-38576) Align commonJoinKey in MultiJoin for logical and physical rules

     [ https://issues.apache.org/jira/browse/FLINK-38576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Nuyanzin resolved FLINK-38576.
-------------------------------------
    Resolution: Fixed

> 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)