xuyang created FLINK-33396:
------------------------------
Summary: The table alias when using join hints should be removed
in the final plan
Key: FLINK-33396
URL: https://issues.apache.org/jira/browse/FLINK-33396
Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Affects Versions: 1.17.0, 1.16.0, 1.18.0
Reporter: xuyang
See the existent test
'NestLoopJoinHintTest#testJoinHintWithJoinHintInCorrelateAndWithAgg', the plan
isĀ
{code:java}
HashJoin(joinType=[LeftSemiJoin], where=[=(a1, EXPR$0)], select=[a1, b1],
build=[right], tryDistinctBuildRow=[true])
:- Exchange(distribution=[hash[a1]])
: +- TableSourceScan(table=[[default_catalog, default_database, T1]],
fields=[a1, b1])
+- Exchange(distribution=[hash[EXPR$0]])
+- LocalHashAggregate(groupBy=[EXPR$0], select=[EXPR$0])
+- Calc(select=[EXPR$0])
+- HashAggregate(isMerge=[true], groupBy=[a1], select=[a1,
Final_COUNT(count$0) AS EXPR$0])
+- Exchange(distribution=[hash[a1]])
+- LocalHashAggregate(groupBy=[a1], select=[a1,
Partial_COUNT(a2) AS count$0])
+- NestedLoopJoin(joinType=[InnerJoin], where=[=(a2, a1)],
select=[a2, a1], build=[right])
:- TableSourceScan(table=[[default_catalog,
default_database, T2, project=[a2], metadata=[]]], fields=[a2], hints=[[[ALIAS
options:[T2]]]])
+- Exchange(distribution=[broadcast])
+- TableSourceScan(table=[[default_catalog,
default_database, T1, project=[a1], metadata=[]]], fields=[a1], hints=[[[ALIAS
options:[T1]]]]) {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)