Gustavo de Morais created FLINK-38576:
-----------------------------------------

             Summary: 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
             Fix For: 2.2.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)

Reply via email to