gustavodemorais commented on code in PR #26702: URL: https://github.com/apache/flink/pull/26702#discussion_r2157531634
########## flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/JoinToMultiJoinRule.java: ########## @@ -546,12 +557,140 @@ private boolean canCombine( } else { return false; } - return true; + return haveCommonJoinKey(origJoin, join); } else { return false; } } + /** + * Checks if original Join and child multi-join have common join keys. + * + * @param origJoin original Join + * @param otherJoin child MultiJoin + * @return true if original Join and child multi-join have at least one common JoinKey + */ + private boolean haveCommonJoinKey(Join origJoin, MultiJoin otherJoin) { Review Comment: I think both would be work since you work read the the "joins" _have_ a common join key 🤷♂️ -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org