Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Sep 1, 2025

Cherry-picked from #55476

…#55476)

improve performance of cast big string to complex type
1. avoid throw cast exception
2. avoid compute full hash code of the big string literal


```sql
select cast('[1,2,3,4,5,6,7,8,...,99999]' as array<float>);
```
@github-actions github-actions bot requested a review from morrySnow as a code owner September 1, 2025 06:18
@hello-stephen
Copy link
Contributor

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?

@dataroaring dataroaring closed this Sep 1, 2025
@dataroaring dataroaring reopened this Sep 1, 2025
@hello-stephen
Copy link
Contributor

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17607	5492	5470	5470
q2	2011	394	284	284
q3	11537	1241	737	737
q4	10289	861	444	444
q5	9451	2341	2144	2144
q6	191	162	129	129
q7	885	730	616	616
q8	9323	1414	1186	1186
q9	5185	4961	4883	4883
q10	6775	2261	1809	1809
q11	493	278	262	262
q12	334	353	207	207
q13	17784	3585	3023	3023
q14	225	221	203	203
q15	528	464	457	457
q16	421	424	368	368
q17	575	856	365	365
q18	6893	6416	6383	6383
q19	1214	937	534	534
q20	329	332	208	208
q21	2914	2086	1954	1954
q22	1026	1025	1001	1001
Total cold run time: 105990 ms
Total hot run time: 32667 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5520	5464	5494	5464
q2	239	319	241	241
q3	2248	2581	2330	2330
q4	1336	1766	1327	1327
q5	4419	4939	4989	4939
q6	165	160	130	130
q7	2114	2055	1819	1819
q8	2676	2847	2799	2799
q9	7415	7354	7316	7316
q10	3032	3295	2742	2742
q11	573	502	503	502
q12	692	787	630	630
q13	3415	3796	3147	3147
q14	279	310	265	265
q15	514	480	482	480
q16	431	502	431	431
q17	1231	1704	1255	1255
q18	7485	7328	7355	7328
q19	801	1073	1129	1073
q20	1981	2006	1931	1931
q21	5329	4970	4553	4553
q22	1107	1046	1009	1009
Total cold run time: 53002 ms
Total hot run time: 51711 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 193188 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 855def58e8e20414fda450c32b0f10594cee124d, data reload: false

query1	982	413	409	409
query2	6351	1949	1943	1943
query3	8686	201	205	201
query4	33621	23923	23636	23636
query5	3613	584	446	446
query6	295	192	198	192
query7	4204	489	305	305
query8	300	236	230	230
query9	9382	2571	2570	2570
query10	447	319	247	247
query11	18012	15417	15245	15245
query12	151	107	104	104
query13	1557	564	425	425
query14	9949	7403	7437	7403
query15	246	189	180	180
query16	7432	604	485	485
query17	1579	787	590	590
query18	1427	389	346	346
query19	241	187	186	186
query20	126	126	126	126
query21	218	132	111	111
query22	4613	4597	4605	4597
query23	34846	34264	33903	33903
query24	7396	2659	2696	2659
query25	542	484	443	443
query26	802	289	170	170
query27	1965	487	370	370
query28	5412	2219	2194	2194
query29	601	597	465	465
query30	245	197	171	171
query31	985	907	875	875
query32	97	61	59	59
query33	540	386	321	321
query34	746	848	519	519
query35	761	816	737	737
query36	1028	1068	973	973
query37	105	93	71	71
query38	4009	4018	3992	3992
query39	1533	1480	1470	1470
query40	211	115	101	101
query41	50	48	54	48
query42	120	106	112	106
query43	497	533	483	483
query44	1305	850	830	830
query45	184	179	177	177
query46	900	1055	666	666
query47	2018	2006	1905	1905
query48	404	437	352	352
query49	747	490	424	424
query50	671	681	442	442
query51	7320	7329	7227	7227
query52	109	100	93	93
query53	224	261	192	192
query54	552	553	497	497
query55	78	79	81	79
query56	281	290	257	257
query57	1251	1253	1211	1211
query58	238	232	227	227
query59	3061	3181	3060	3060
query60	303	294	262	262
query61	111	109	115	109
query62	773	766	690	690
query63	233	193	202	193
query64	3675	1009	668	668
query65	3417	3313	3353	3313
query66	801	404	305	305
query67	16411	15680	15567	15567
query68	7762	847	537	537
query69	496	302	273	273
query70	1181	1095	1118	1095
query71	396	294	264	264
query72	5739	3770	3895	3770
query73	641	745	355	355
query74	10251	9143	9316	9143
query75	3170	3166	2673	2673
query76	3027	1171	771	771
query77	544	360	268	268
query78	10394	10438	9618	9618
query79	3938	832	601	601
query80	804	509	437	437
query81	512	254	222	222
query82	578	122	88	88
query83	165	161	154	154
query84	239	93	79	79
query85	776	387	298	298
query86	391	306	310	306
query87	4295	4363	4228	4228
query88	5136	2418	2385	2385
query89	405	335	296	296
query90	1778	190	190	190
query91	148	145	110	110
query92	69	61	52	52
query93	2548	876	548	548
query94	696	414	295	295
query95	343	279	273	273
query96	492	623	285	285
query97	3163	3271	3215	3215
query98	239	213	205	205
query99	1347	1380	1301	1301
Total cold run time: 292653 ms
Total hot run time: 193188 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.02
query2	0.07	0.03	0.02
query3	0.23	0.07	0.07
query4	1.63	0.10	0.10
query5	0.51	0.51	0.53
query6	1.13	0.73	0.74
query7	0.02	0.01	0.01
query8	0.04	0.03	0.03
query9	0.56	0.52	0.50
query10	0.54	0.54	0.57
query11	0.15	0.10	0.10
query12	0.14	0.11	0.11
query13	0.61	0.64	0.59
query14	0.78	0.80	0.80
query15	0.85	0.83	0.83
query16	0.38	0.39	0.40
query17	1.00	1.06	1.04
query18	0.24	0.24	0.21
query19	1.96	1.83	1.85
query20	0.01	0.01	0.01
query21	15.37	0.92	0.56
query22	0.72	0.72	0.52
query23	15.39	1.48	0.52
query24	3.35	0.64	0.98
query25	0.17	0.13	0.10
query26	0.30	0.15	0.14
query27	0.06	0.07	0.05
query28	13.48	1.07	0.44
query29	12.54	3.84	3.20
query30	0.24	0.08	0.06
query31	2.83	0.60	0.38
query32	3.22	0.54	0.46
query33	3.01	2.97	3.04
query34	16.69	5.15	4.50
query35	4.58	4.65	4.54
query36	0.62	0.50	0.51
query37	0.08	0.05	0.05
query38	0.04	0.04	0.04
query39	0.04	0.02	0.02
query40	0.17	0.13	0.12
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 103.93 s
Total hot run time: 28.32 s

@morrySnow morrySnow merged commit 758fce9 into branch-3.1 Sep 4, 2025
23 checks passed
@morrySnow morrySnow deleted the auto-pick-55476-branch-3.1 branch September 4, 2025 02:29
@morrySnow morrySnow mentioned this pull request Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants