Skip to content

Conversation

@Jibing-Li
Copy link
Contributor

backport: #48689

…error (apache#48689)

When client send a prepare command to non master frontend like `INSERT
INTO xxxx VALUES(?)` and then execute it whith some params.
The non master frontend will forward the origin stmt to master and
analyze error will occur.
In this PR, we forward the origin sql and param to master. Master
prepare a logic plan with place holder and then use the param and logic
plan to generate physical plan.
@Jibing-Li Jibing-Li marked this pull request as ready for review June 25, 2025 02:41
@Jibing-Li Jibing-Li requested a review from dataroaring as a code owner June 25, 2025 02:41
@Jibing-Li
Copy link
Contributor Author

run buildall

@Thearas
Copy link
Contributor

Thearas commented Jun 25, 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?

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.03% (1101/1326)
Line Coverage 66.33% (18519/27919)
Region Coverage 66.21% (9173/13854)
Branch Coverage 56.10% (4982/8880)

@doris-robot
Copy link

TPC-H: Total hot run time: 39853 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 9b437a577dc63eb3e4ae0ea2555443b0677b69b6, data reload: false

------ Round 1 ----------------------------------
q1	17578	6776	6611	6611
q2	2096	170	166	166
q3	10715	1053	1150	1053
q4	10465	748	762	748
q5	7783	2910	2856	2856
q6	210	134	136	134
q7	984	618	614	614
q8	9358	1971	2022	1971
q9	6614	6386	6446	6386
q10	7042	2287	2311	2287
q11	464	267	259	259
q12	399	215	214	214
q13	17786	3001	3004	3001
q14	226	204	207	204
q15	510	460	459	459
q16	507	390	385	385
q17	988	601	580	580
q18	7312	6754	6652	6652
q19	1414	1069	987	987
q20	492	205	206	205
q21	3923	3120	3195	3120
q22	1083	994	961	961
Total cold run time: 107949 ms
Total hot run time: 39853 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6618	6604	6592	6592
q2	335	228	232	228
q3	2924	2779	2911	2779
q4	2023	1830	1801	1801
q5	5789	5752	5726	5726
q6	218	133	131	131
q7	2230	1802	1806	1802
q8	3399	3558	3558	3558
q9	8989	8764	8946	8764
q10	3579	3511	3527	3511
q11	603	517	508	508
q12	774	577	609	577
q13	9465	3145	3229	3145
q14	286	263	253	253
q15	507	457	468	457
q16	491	438	437	437
q17	1859	1606	1577	1577
q18	8291	7701	7688	7688
q19	1702	1452	1501	1452
q20	2117	1881	1805	1805
q21	4992	5033	4961	4961
q22	1104	1030	1023	1023
Total cold run time: 68295 ms
Total hot run time: 58775 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 196279 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 9b437a577dc63eb3e4ae0ea2555443b0677b69b6, data reload: false

query1	1308	926	911	911
query2	6392	1942	1879	1879
query3	10840	4391	4321	4321
query4	62134	29649	24392	24392
query5	5195	460	450	450
query6	401	181	193	181
query7	5465	306	310	306
query8	303	219	210	210
query9	8146	2568	2574	2568
query10	443	290	266	266
query11	17747	15358	15931	15358
query12	166	112	111	111
query13	1404	446	433	433
query14	10640	6873	7366	6873
query15	197	177	183	177
query16	7263	489	493	489
query17	1153	564	575	564
query18	1923	312	317	312
query19	204	160	151	151
query20	119	112	111	111
query21	201	105	108	105
query22	4543	4421	4661	4421
query23	34740	34182	33782	33782
query24	6210	2952	2908	2908
query25	527	417	424	417
query26	664	175	171	171
query27	1706	362	369	362
query28	3996	2182	2129	2129
query29	736	488	470	470
query30	259	169	181	169
query31	986	816	813	813
query32	68	56	59	56
query33	458	332	304	304
query34	948	508	522	508
query35	887	765	734	734
query36	1117	956	954	954
query37	118	70	74	70
query38	4082	3956	3988	3956
query39	1536	1507	1499	1499
query40	209	109	107	107
query41	50	53	51	51
query42	133	103	100	100
query43	528	476	478	476
query44	1209	832	831	831
query45	189	177	181	177
query46	1153	734	751	734
query47	2030	1894	1926	1894
query48	482	398	420	398
query49	741	412	436	412
query50	850	432	441	432
query51	7617	7301	7167	7167
query52	128	93	88	88
query53	266	198	188	188
query54	585	462	455	455
query55	78	79	83	79
query56	268	255	278	255
query57	1304	1216	1227	1216
query58	218	220	221	220
query59	3195	2995	3058	2995
query60	286	272	289	272
query61	154	123	120	120
query62	795	700	701	700
query63	220	190	188	188
query64	1354	663	632	632
query65	3393	3244	3258	3244
query66	704	302	306	302
query67	15897	15419	15485	15419
query68	4253	583	584	583
query69	442	278	265	265
query70	1196	1053	1119	1053
query71	368	257	262	257
query72	6393	2482	3887	2482
query73	771	341	351	341
query74	9419	9003	9217	9003
query75	3439	2645	2669	2645
query76	1957	1132	1109	1109
query77	483	282	274	274
query78	11096	9844	9996	9844
query79	2084	592	609	592
query80	1354	434	430	430
query81	508	230	232	230
query82	947	89	91	89
query83	166	147	145	145
query84	289	82	75	75
query85	976	300	301	300
query86	365	300	295	295
query87	4402	4255	4199	4199
query88	3932	2374	2333	2333
query89	443	303	292	292
query90	1999	186	192	186
query91	186	151	146	146
query92	60	52	51	51
query93	2881	551	552	551
query94	791	308	300	300
query95	359	258	252	252
query96	635	276	281	276
query97	3362	3175	3127	3127
query98	236	208	200	200
query99	1583	1311	1318	1311
Total cold run time: 316636 ms
Total hot run time: 196279 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.08	0.05	0.04
query3	0.23	0.05	0.06
query4	1.66	0.08	0.09
query5	0.53	0.52	0.52
query6	1.14	0.76	0.74
query7	0.02	0.02	0.02
query8	0.05	0.05	0.04
query9	0.56	0.50	0.52
query10	0.55	0.55	0.56
query11	0.17	0.12	0.12
query12	0.16	0.12	0.14
query13	0.61	0.60	0.60
query14	0.77	0.81	0.80
query15	0.84	0.85	0.83
query16	0.38	0.39	0.38
query17	1.07	1.07	1.06
query18	0.19	0.18	0.18
query19	1.97	1.86	1.84
query20	0.02	0.01	0.02
query21	15.39	0.68	0.66
query22	4.30	6.15	2.35
query23	18.31	1.48	1.38
query24	1.82	0.32	0.23
query25	0.12	0.09	0.08
query26	0.28	0.18	0.18
query27	0.08	0.09	0.07
query28	13.22	0.62	0.59
query29	12.63	3.37	3.33
query30	0.25	0.06	0.06
query31	2.85	0.41	0.41
query32	3.24	0.49	0.48
query33	2.96	3.03	3.03
query34	16.96	4.53	4.46
query35	4.59	4.53	4.56
query36	0.66	0.49	0.51
query37	0.19	0.17	0.17
query38	0.17	0.16	0.16
query39	0.06	0.04	0.05
query40	0.17	0.14	0.13
query41	0.10	0.05	0.05
query42	0.06	0.04	0.05
query43	0.05	0.04	0.05
Total cold run time: 109.49 s
Total hot run time: 31.47 s

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

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

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@dataroaring dataroaring merged commit 2db6e5e into apache:branch-3.0 Jun 26, 2025
23 of 25 checks passed
@Jibing-Li Jibing-Li deleted the obprepare3.0 branch June 27, 2025 06:04
koarz pushed a commit to koarz/doris that referenced this pull request Jul 3, 2025
… non master error (apache#48689) (apache#52266)

backport: apache#48689

Co-authored-by: Lijia Liu <liutang123@yeah.net>
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