twalthr commented on code in PR #24992:
URL: https://github.com/apache/flink/pull/24992#discussion_r1673503682
##########
flink-table/flink-table-planner/src/test/resources/org/apache/flink/table/planner/plan/rules/logical/AsyncCalcSplitRuleTest.xml:
##########
@@ -550,6 +550,33 @@ AsyncCalc(select=[func1(a) AS EXPR$0])
+- Exchange(distribution=[single])
+- Calc(select=[a2])
+- TableSourceScan(table=[[default_catalog, default_database,
MyTable2]], fields=[a2, b2, c2, d2])
+]]>
+ </Resource>
+ </TestCase>
+ <TestCase name="testRightJoinWithFuncInWhereUsingBothTables">
+ <Resource name="sql">
+ <![CDATA[SELECT a from MyTable RIGHT JOIN MyTable2 ON a
= a2 WHERE a = a2 AND func6(a, a2) > 10]]>
+ </Resource>
+ <Resource name="ast">
+ <![CDATA[
+LogicalProject(a=[$0])
++- LogicalFilter(condition=[AND(=($0, $4), >(func6($0, $4), 10))])
+ +- LogicalJoin(condition=[=($0, $4)], joinType=[right])
+ :- LogicalTableScan(table=[[default_catalog, default_database, MyTable]])
+ +- LogicalTableScan(table=[[default_catalog, default_database,
MyTable2]])
+]]>
+ </Resource>
+ <Resource name="optimized rel plan">
+ <![CDATA[
+Calc(select=[a], where=[>(f0, 10)])
++- AsyncCalc(select=[a, a2, func6(a, a2) AS f0])
+ +- Join(joinType=[InnerJoin], where=[=(a, a2)], select=[a, a2],
leftInputSpec=[NoUniqueKey], rightInputSpec=[NoUniqueKey])
Review Comment:
Maybe we need to come up with a different example. Because the RIGHT JOIN is
optimized into `joinType=[InnerJoin]`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]