lsyldliu commented on code in PR #22990: URL: https://github.com/apache/flink/pull/22990#discussion_r1271258887
########## flink-table/flink-table-planner/src/test/resources/org/apache/flink/table/planner/plan/batch/sql/join/ShuffledHashJoinTest.xml: ########## @@ -129,14 +129,13 @@ LogicalProject(c=[$7], g=[$3]) </Resource> <Resource name="optimized exec plan"> <![CDATA[ -Calc(select=[c, g]) -+- HashJoin(joinType=[InnerJoin], where=[(a = d)], select=[d, g, a, c], build=[right]) - :- Exchange(distribution=[hash[d]]) - : +- Calc(select=[d, g], where=[(d < 2)]) - : +- LegacyTableSourceScan(table=[[default_catalog, default_database, MyTable2, source: [TestTableSource(d, e, f, g, h)]]], fields=[d, e, f, g, h]) - +- Exchange(distribution=[hash[a]]) - +- Calc(select=[a, c], where=[(a < 2)]) - +- LegacyTableSourceScan(table=[[default_catalog, default_database, MyTable1, source: [TestTableSource(a, b, c)]]], fields=[a, b, c]) +MultipleInput(readOrder=[1,0], members=[\nCalc(select=[c, g])\n+- HashJoin(joinType=[InnerJoin], where=[(a = d)], select=[d, g, a, c], build=[right])\n :- [#1] Exchange(distribution=[hash[d]])\n +- [#2] Exchange(distribution=[hash[a]])\n]) +:- Exchange(distribution=[hash[d]]) +: +- Calc(select=[d, g], where=[(d < 2)]) Review Comment: The current MultipleInput algorithm is the principle of minimisation, allowing only two-input operators as root nodes. In this PR, I extended the MultipleInput algorithm to support that one-input operators can also be root nodes, which allows as many operators as possible to support OFCG, so plan will change. But you reminded me that we should only do this optimisation when `table.exec.operator-fusion-codegen.enabled` is enabled, otherwise we can't get any gain. I have optimised the relevant code. -- 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