Skip to content

[fix](column) validate struct field names in DataTypeStruct constructor#63249

Open
Mryange wants to merge 2 commits into
apache:masterfrom
Mryange:validate-struct-field
Open

[fix](column) validate struct field names in DataTypeStruct constructor#63249
Mryange wants to merge 2 commits into
apache:masterfrom
Mryange:validate-struct-field

Conversation

@Mryange
Copy link
Copy Markdown
Contributor

@Mryange Mryange commented May 14, 2026

What problem does this PR solve?

Problem Summary:

  • Add strict validation for explicit struct field names in DataTypeStruct.
  • Throw exception when a field name is empty.
  • Throw exception when field names are duplicated.
  • Add BE unit test to lock in the constructor behavior.

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

@hello-stephen
Copy link
Copy Markdown
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?

@Mryange
Copy link
Copy Markdown
Contributor Author

Mryange commented May 14, 2026

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17653	3927	3879	3879
q2	q3	10716	880	618	618
q4	4676	472	362	362
q5	7583	1330	1160	1160
q6	260	171	139	139
q7	937	943	766	766
q8	10409	1439	1290	1290
q9	6779	5534	5367	5367
q10	6336	2072	1806	1806
q11	473	269	258	258
q12	696	428	289	289
q13	18169	3379	2749	2749
q14	297	287	269	269
q15	q16	904	870	798	798
q17	971	1085	729	729
q18	6536	5740	5636	5636
q19	1232	1207	1098	1098
q20	511	411	261	261
q21	4482	2310	1902	1902
q22	425	365	305	305
Total cold run time: 100045 ms
Total hot run time: 29681 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4266	4247	4234	4234
q2	q3	4639	4808	4200	4200
q4	2120	2173	1408	1408
q5	4976	5023	5256	5023
q6	192	166	132	132
q7	2365	1839	1669	1669
q8	3489	3161	3131	3131
q9	8559	8529	8425	8425
q10	4496	4493	4259	4259
q11	628	441	397	397
q12	729	761	544	544
q13	3281	3665	2966	2966
q14	325	324	279	279
q15	q16	795	824	701	701
q17	1378	1378	1477	1378
q18	8101	7284	7043	7043
q19	1169	1178	1172	1172
q20	2279	2297	1971	1971
q21	6189	5503	5034	5034
q22	563	540	453	453
Total cold run time: 60539 ms
Total hot run time: 54419 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 170637 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 01f7efe0ce876b24953ad20021068b9da3701558, data reload: false

query5	4289	652	524	524
query6	331	223	212	212
query7	4221	571	300	300
query8	344	236	228	228
query9	8884	4090	4028	4028
query10	466	342	305	305
query11	5783	2459	2237	2237
query12	181	129	130	129
query13	1288	591	420	420
query14	6743	5388	5061	5061
query14_1	4486	4409	4367	4367
query15	218	205	193	193
query16	1003	485	416	416
query17	1144	787	641	641
query18	2800	499	371	371
query19	227	211	168	168
query20	144	141	133	133
query21	217	141	120	120
query22	13604	14704	14403	14403
query23	17391	16491	16192	16192
query23_1	16376	16175	16346	16175
query24	7712	1741	1336	1336
query24_1	1347	1341	1335	1335
query25	541	468	460	460
query26	1309	315	165	165
query27	2715	603	324	324
query28	4341	1969	1920	1920
query29	994	649	514	514
query30	303	237	193	193
query31	1106	1062	932	932
query32	86	72	71	71
query33	562	352	299	299
query34	1312	1143	642	642
query35	776	785	652	652
query36	1335	1314	1206	1206
query37	156	99	88	88
query38	3217	3138	3093	3093
query39	914	939	901	901
query39_1	886	861	891	861
query40	232	151	135	135
query41	65	64	59	59
query42	107	107	107	107
query43	316	326	290	290
query44	
query45	208	208	196	196
query46	1069	1243	719	719
query47	2279	2248	2109	2109
query48	399	423	292	292
query49	632	519	429	429
query50	734	276	226	226
query51	4337	4279	4160	4160
query52	106	108	92	92
query53	255	277	196	196
query54	400	277	259	259
query55	91	91	83	83
query56	291	309	305	305
query57	1419	1350	1277	1277
query58	308	268	270	268
query59	1521	1590	1428	1428
query60	333	328	317	317
query61	197	161	153	153
query62	689	629	568	568
query63	243	210	212	210
query64	2319	826	693	693
query65	
query66	1675	525	390	390
query67	29447	29360	29192	29192
query68	
query69	451	343	305	305
query70	1012	1011	965	965
query71	324	274	277	274
query72	2940	2791	2582	2582
query73	865	756	422	422
query74	5082	4966	4763	4763
query75	2802	2683	2373	2373
query76	2325	1126	770	770
query77	421	431	351	351
query78	12872	13027	12292	12292
query79	1598	1017	711	711
query80	1381	592	485	485
query81	535	275	242	242
query82	981	159	117	117
query83	324	276	257	257
query84	264	145	108	108
query85	919	514	462	462
query86	455	350	363	350
query87	3428	3339	3255	3255
query88	3519	2663	2639	2639
query89	446	373	348	348
query90	1919	179	183	179
query91	189	166	137	137
query92	92	74	69	69
query93	1124	941	549	549
query94	771	337	303	303
query95	697	379	359	359
query96	1055	791	343	343
query97	2692	2674	2535	2535
query98	233	227	229	227
query99	1117	1109	959	959
Total cold run time: 255097 ms
Total hot run time: 170637 ms

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.

2 participants