xuyangzhong commented on code in PR #24239:
URL: https://github.com/apache/flink/pull/24239#discussion_r1475586086


##########
flink-table/flink-table-planner/src/test/resources/org/apache/flink/table/planner/plan/hints/batch/NestLoopJoinHintTest.xml:
##########
@@ -679,8 +680,8 @@ HashJoin(joinType=[LeftSemiJoin], where=[=(a1, a2)], 
select=[a1, b1], build=[rig
    +- Calc(select=[a2])
       +- NestedLoopJoin(joinType=[InnerJoin], where=[=(a2, a3)], select=[a2, 
a3], build=[left])
          :- Exchange(distribution=[broadcast])
-         :  +- TableSourceScan(table=[[default_catalog, default_database, T2, 
project=[a2], metadata=[]]], fields=[a2], hints=[[[ALIAS options:[T2]]]])
-         +- TableSourceScan(table=[[default_catalog, default_database, T3, 
project=[a3], metadata=[]]], fields=[a3], hints=[[[ALIAS options:[T3]]]])

Review Comment:
   Hi, I found 
ClearQueryBlockAliasResolverTest#testJoinHintWithJoinHintInCorrelateAndWithAgg 
do the similar test. Can you take a look to check if it's what you mean?
   In this test, Join Hint will not be cleared and only Alias Hint will be 
cleared.
   ```
     <TestCase name="testJoinHintWithJoinHintInCorrelateAndWithAgg">
       <Resource name="sql">
         <![CDATA[select * from T1 WHERE a1 IN (select /*+ BrOaDcAsT(T2) */ 
count(T2.a2) from T2 join T1 on T2.a2 = T1.a1 group by T1.a1)]]>
       </Resource>
       <Resource name="ast">
         <![CDATA[
   LogicalProject(a1=[$0], b1=[$1]), rowType=[RecordType(BIGINT a1, 
VARCHAR(2147483647) b1)]
   +- LogicalFilter(condition=[IN($0, {
   LogicalProject(EXPR$0=[$1]), rowType=[RecordType(BIGINT EXPR$0)]
   +- LogicalAggregate(group=[{0}], EXPR$0=[COUNT($1)]), 
rowType=[RecordType(BIGINT a1, BIGINT EXPR$0)]
      +- LogicalProject(a1=[$2], a2=[$0]), rowType=[RecordType(BIGINT a1, 
BIGINT a2)]
         +- LogicalJoin(condition=[=($0, $2)], joinType=[inner], 
joinHints=[[[BROADCAST options:[LEFT]]]]), rowType=[RecordType(BIGINT a2, 
VARCHAR(2147483647) b2, BIGINT a1, VARCHAR(2147483647) b1)]
            :- LogicalTableScan(table=[[default_catalog, default_database, 
T2]]), rowType=[RecordType(BIGINT a2, VARCHAR(2147483647) b2)]
            +- LogicalTableScan(table=[[default_catalog, default_database, 
T1]]), rowType=[RecordType(BIGINT a1, VARCHAR(2147483647) b1)]
   })]), rowType=[RecordType(BIGINT a1, VARCHAR(2147483647) b1)]
      +- LogicalTableScan(table=[[default_catalog, default_database, T1]]), 
rowType=[RecordType(BIGINT a1, VARCHAR(2147483647) b1)]
   ]]>
       </Resource>
     </TestCase>
   ```



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

Reply via email to