twalthr commented on code in PR #26703:
URL: https://github.com/apache/flink/pull/26703#discussion_r2158252923


##########
flink-table/flink-table-planner/src/test/resources/org/apache/flink/table/planner/plan/stream/sql/RelTimeIndicatorConverterTest.xml:
##########
@@ -150,6 +150,44 @@ Sink(table=[default_catalog.default_database.appendSink1], 
fields=[long, sum])
 
 Sink(table=[default_catalog.default_database.appendSink2], fields=[long, sum])
 +- Reused(reference_id=[1])
+]]>
+    </Resource>
+  </TestCase>
+  <TestCase name="testJoin">
+    <Resource name="sql">
+      <![CDATA[
+SELECT T1.rowtime, T2.proctime, T1.long, T2.`int`, T3.long
+FROM MyTable1 T1
+JOIN MyTable2 T2 ON T1.long = T2.long AND T1.`int` > 10
+JOIN MyTable1 T3 ON T1.long = T3.long AND T3.`int` < 20
+      ]]>
+    </Resource>
+    <Resource name="ast">
+      <![CDATA[
+LogicalProject(rowtime=[$0], proctime=[$5], long=[$1], int=[$4], long0=[$7])
++- LogicalJoin(condition=[AND(=($1, $7), <($8, 20))], joinType=[inner])
+   :- LogicalJoin(condition=[AND(=($1, $3), >($2, 10))], joinType=[inner])
+   :  :- LogicalTableScan(table=[[default_catalog, default_database, 
MyTable1]])
+   :  +- LogicalTableScan(table=[[default_catalog, default_database, 
MyTable2]])
+   +- LogicalTableScan(table=[[default_catalog, default_database, MyTable1]])
+]]>
+    </Resource>
+    <Resource name="optimized exec plan">
+      <![CDATA[
+Calc(select=[rowtime, proctime, long, int0 AS int, long0])
++- Join(joinType=[InnerJoin], where=[(long = long0)], select=[rowtime, long, 
int0, proctime, long0], leftInputSpec=[NoUniqueKey], 
rightInputSpec=[NoUniqueKey])

Review Comment:
   Thanks for the explanation. This is enough context for me.



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

Reply via email to