Skip to content

Conversation

@englefly
Copy link
Contributor

What problem does this PR solve?

This change extends the tableAlias feature from the logical plan layer to the physical plan layer, enabling table aliases to be preserved throughout the entire query execution pipeline from SQL parsing to physical execution.

When analyzing query execution plans, especially for complex queries where the same table appears multiple times with different aliases, it has been challenging to match scan nodes in the plan back to their corresponding table references in the original SQL.

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Oct 10, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@englefly
Copy link
Contributor Author

run buildall

3 similar comments
@englefly
Copy link
Contributor Author

run buildall

@englefly
Copy link
Contributor Author

run buildall

@englefly
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

ClickBench: Total hot run time: 30.58 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 5ec69d18258ae57b7515e9c7d863b96af42c6d24, data reload: false

query1	0.06	0.05	0.05
query2	0.09	0.06	0.06
query3	0.26	0.08	0.08
query4	1.61	0.12	0.12
query5	0.29	0.26	0.26
query6	1.18	0.66	0.66
query7	0.03	0.02	0.02
query8	0.06	0.04	0.04
query9	0.63	0.54	0.53
query10	0.61	0.61	0.58
query11	0.16	0.11	0.11
query12	0.15	0.12	0.12
query13	0.63	0.61	0.64
query14	1.05	1.03	1.03
query15	0.87	0.85	0.88
query16	0.39	0.41	0.38
query17	1.07	1.06	1.08
query18	0.22	0.20	0.21
query19	1.97	1.84	1.82
query20	0.02	0.01	0.02
query21	15.42	0.97	0.59
query22	0.77	1.28	1.04
query23	14.74	1.41	0.61
query24	6.87	1.66	0.56
query25	0.43	0.14	0.09
query26	0.61	0.18	0.13
query27	0.08	0.05	0.05
query28	9.17	1.38	0.93
query29	12.56	4.00	3.26
query30	0.28	0.14	0.11
query31	2.83	0.59	0.40
query32	3.26	0.57	0.49
query33	3.09	3.05	3.12
query34	16.16	5.47	4.89
query35	4.95	4.91	4.95
query36	0.68	0.56	0.50
query37	0.10	0.08	0.07
query38	0.08	0.05	0.04
query39	0.04	0.03	0.04
query40	0.18	0.15	0.16
query41	0.09	0.03	0.04
query42	0.05	0.04	0.03
query43	0.05	0.04	0.03
Total cold run time: 103.84 s
Total hot run time: 30.58 s

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 55.73% (73/131) 🎉
Increment coverage report
Complete coverage report

@englefly
Copy link
Contributor Author

run buildall

1 similar comment
@englefly
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-DS: Total hot run time: 190460 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit d1e405e9e98fcda02d8875d656e70f23666ff603, data reload: false

query1	1077	419	412	412
query2	6546	1679	1659	1659
query3	6751	232	224	224
query4	26271	23390	23508	23390
query5	5070	680	488	488
query6	331	250	218	218
query7	4664	500	290	290
query8	313	270	262	262
query9	8729	2581	2587	2581
query10	541	337	306	306
query11	15674	15071	14979	14979
query12	193	115	119	115
query13	1671	545	431	431
query14	11549	9316	9172	9172
query15	221	198	174	174
query16	7678	697	528	528
query17	1263	739	613	613
query18	2053	474	367	367
query19	237	232	196	196
query20	150	131	132	131
query21	224	144	128	128
query22	4696	4696	4595	4595
query23	34591	34252	33825	33825
query24	8524	2490	2526	2490
query25	630	659	476	476
query26	1537	284	164	164
query27	2734	529	374	374
query28	4464	2221	2226	2221
query29	815	649	506	506
query30	329	241	206	206
query31	925	853	766	766
query32	93	81	83	81
query33	653	393	363	363
query34	816	874	532	532
query35	854	941	776	776
query36	964	1063	974	974
query37	133	126	85	85
query38	3523	3538	3457	3457
query39	1476	1415	1416	1415
query40	226	123	124	123
query41	61	58	58	58
query42	127	108	114	108
query43	480	506	470	470
query44	1343	837	824	824
query45	191	186	170	170
query46	841	1013	644	644
query47	1746	1814	1747	1747
query48	393	424	320	320
query49	773	522	402	402
query50	659	695	413	413
query51	3994	3868	3905	3868
query52	111	106	99	99
query53	240	270	197	197
query54	614	624	550	550
query55	95	91	86	86
query56	345	356	325	325
query57	1176	1195	1136	1136
query58	302	281	287	281
query59	2580	2734	2532	2532
query60	370	365	347	347
query61	186	181	185	181
query62	799	727	670	670
query63	232	201	208	201
query64	4556	1246	843	843
query65	4088	3958	3954	3954
query66	1080	437	341	341
query67	15696	15433	15042	15042
query68	9519	950	597	597
query69	486	323	301	301
query70	1342	1249	1301	1249
query71	496	339	331	331
query72	5532	4855	4713	4713
query73	697	566	359	359
query74	8838	9154	8911	8911
query75	4537	3387	2871	2871
query76	4611	1168	770	770
query77	1093	407	323	323
query78	9488	9502	8947	8947
query79	7072	810	582	582
query80	725	572	509	509
query81	498	263	227	227
query82	430	165	143	143
query83	293	271	241	241
query84	298	123	97	97
query85	853	481	421	421
query86	337	311	304	304
query87	3774	3805	3710	3710
query88	2886	2234	2241	2234
query89	441	328	310	310
query90	2126	225	220	220
query91	159	167	140	140
query92	84	75	64	64
query93	3736	980	643	643
query94	688	442	341	341
query95	413	323	324	323
query96	485	585	286	286
query97	2925	3001	2868	2868
query98	235	221	217	217
query99	1421	1395	1306	1306
Total cold run time: 288785 ms
Total hot run time: 190460 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.11 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit d1e405e9e98fcda02d8875d656e70f23666ff603, data reload: false

query1	0.06	0.05	0.05
query2	0.09	0.06	0.07
query3	0.25	0.09	0.09
query4	1.61	0.12	0.11
query5	0.28	0.26	0.25
query6	1.18	0.66	0.66
query7	0.03	0.03	0.03
query8	0.07	0.05	0.04
query9	0.64	0.52	0.52
query10	0.58	0.57	0.58
query11	0.16	0.11	0.12
query12	0.15	0.12	0.12
query13	0.64	0.61	0.63
query14	1.07	1.02	1.01
query15	0.88	0.88	0.88
query16	0.39	0.40	0.39
query17	1.05	1.08	1.06
query18	0.21	0.20	0.21
query19	1.93	1.85	1.85
query20	0.01	0.01	0.01
query21	15.45	0.91	0.58
query22	0.76	1.23	0.74
query23	14.80	1.39	0.64
query24	7.30	1.26	0.32
query25	0.30	0.10	0.08
query26	0.57	0.17	0.14
query27	0.06	0.06	0.06
query28	8.66	1.38	0.93
query29	12.59	3.96	3.35
query30	0.27	0.13	0.12
query31	2.83	0.60	0.38
query32	3.25	0.56	0.49
query33	3.10	3.13	3.06
query34	16.19	5.48	4.82
query35	4.91	4.91	4.89
query36	0.70	0.52	0.50
query37	0.10	0.08	0.07
query38	0.07	0.06	0.04
query39	0.04	0.03	0.03
query40	0.17	0.15	0.16
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 103.57 s
Total hot run time: 30.11 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 38.06% (51/134) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 56.72% (76/134) 🎉
Increment coverage report
Complete coverage report

@englefly
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

ClickBench: Total hot run time: 29.99 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 50a4b28a59b32c02f0a2715b3bb1aa3825ad8f3e, data reload: false

query1	0.05	0.05	0.05
query2	0.09	0.05	0.06
query3	0.26	0.08	0.08
query4	1.61	0.12	0.12
query5	0.27	0.26	0.25
query6	1.21	0.65	0.65
query7	0.03	0.03	0.03
query8	0.05	0.04	0.04
query9	0.66	0.53	0.51
query10	0.59	0.57	0.57
query11	0.17	0.12	0.12
query12	0.15	0.12	0.13
query13	0.63	0.61	0.63
query14	1.03	1.02	1.05
query15	0.86	0.85	0.89
query16	0.40	0.40	0.41
query17	1.03	1.05	1.08
query18	0.21	0.21	0.20
query19	1.94	1.82	1.78
query20	0.01	0.01	0.02
query21	15.44	0.92	0.58
query22	0.76	1.09	0.63
query23	15.10	1.38	0.65
query24	6.97	1.22	0.38
query25	0.37	0.20	0.13
query26	0.64	0.16	0.14
query27	0.07	0.06	0.05
query28	8.94	1.39	0.93
query29	12.65	3.94	3.25
query30	0.28	0.13	0.12
query31	2.83	0.61	0.40
query32	3.25	0.56	0.48
query33	3.10	3.12	3.08
query34	15.95	5.48	4.86
query35	4.90	4.96	4.92
query36	0.70	0.54	0.50
query37	0.10	0.07	0.07
query38	0.08	0.05	0.04
query39	0.04	0.03	0.03
query40	0.20	0.15	0.14
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 103.79 s
Total hot run time: 29.99 s

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 56.72% (76/134) 🎉
Increment coverage report
Complete coverage report

@englefly
Copy link
Contributor Author

run feut

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 38.06% (51/134) 🎉
Increment coverage report
Complete coverage report

@englefly
Copy link
Contributor Author

run feut

@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 14, 2025
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

@yujun777 yujun777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@englefly englefly merged commit 2768793 into apache:master Oct 14, 2025
27 of 28 checks passed
morningman pushed a commit that referenced this pull request Nov 27, 2025
### What problem does this PR solve?

Related PR: #56802

Problem Summary:

`LogicalHudiScan` did not override `withTableAlias()` and
`withCachedOutput()` methods, causing HUDI table type information to be
lost during optimization, and the table was incorrectly processed as
`PhysicalFileScan`.
nagisa-kunhah pushed a commit to nagisa-kunhah/doris that referenced this pull request Dec 14, 2025
…he#58413)

### What problem does this PR solve?

Related PR: apache#56802

Problem Summary:

`LogicalHudiScan` did not override `withTableAlias()` and
`withCachedOutput()` methods, causing HUDI table type information to be
lost during optimization, and the table was incorrectly processed as
`PhysicalFileScan`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants