Skip to content

[chore](beut) fix beut use assume_mutable#63598

Merged
hello-stephen merged 2 commits into
apache:masterfrom
Mryange:fix-be-ut-5.25
May 25, 2026
Merged

[chore](beut) fix beut use assume_mutable#63598
hello-stephen merged 2 commits into
apache:masterfrom
Mryange:fix-be-ut-5.25

Conversation

@Mryange
Copy link
Copy Markdown
Contributor

@Mryange Mryange commented May 25, 2026

What problem does this PR solve?

Related PR: #63386

now use assert_mutable

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

@Mryange
Copy link
Copy Markdown
Contributor Author

Mryange commented May 25, 2026

run buildall

@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?

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31484 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 29a0ab979b87a095b226d16ac565f081ce13c59b, 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	17651	4189	4189	4189
q2	q3	10827	1400	836	836
q4	4682	476	354	354
q5	7648	2286	2130	2130
q6	238	173	138	138
q7	973	778	676	676
q8	9446	1822	1563	1563
q9	5274	4980	4943	4943
q10	6394	2188	1878	1878
q11	435	283	256	256
q12	643	435	300	300
q13	18114	3359	2838	2838
q14	270	259	235	235
q15	q16	822	780	711	711
q17	882	875	967	875
q18	6926	5728	5566	5566
q19	1354	1307	1051	1051
q20	510	403	257	257
q21	6037	2624	2381	2381
q22	439	364	307	307
Total cold run time: 99565 ms
Total hot run time: 31484 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	4370	4311	4396	4311
q2	q3	4516	4961	4363	4363
q4	2133	2225	1403	1403
q5	4478	4330	4550	4330
q6	299	212	154	154
q7	2248	1931	1669	1669
q8	2588	2240	2337	2240
q9	8429	8137	8075	8075
q10	4817	4791	4324	4324
q11	593	437	450	437
q12	753	771	563	563
q13	3282	3693	2928	2928
q14	286	315	289	289
q15	q16	727	735	685	685
q17	1397	1507	1374	1374
q18	7765	7384	7200	7200
q19	1210	1106	1131	1106
q20	2256	2243	1968	1968
q21	5387	4710	4517	4517
q22	520	451	406	406
Total cold run time: 58054 ms
Total hot run time: 52342 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 172519 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 29a0ab979b87a095b226d16ac565f081ce13c59b, data reload: false

query5	4323	656	536	536
query6	327	213	205	205
query7	4226	586	304	304
query8	329	235	226	226
query9	8855	4133	4086	4086
query10	455	364	301	301
query11	5817	2573	2276	2276
query12	182	128	125	125
query13	1326	601	436	436
query14	6154	5537	5198	5198
query14_1	4533	4489	4490	4489
query15	212	205	190	190
query16	990	467	416	416
query17	954	723	607	607
query18	2450	490	348	348
query19	212	197	158	158
query20	134	127	130	127
query21	217	138	118	118
query22	13589	13586	13323	13323
query23	17357	16546	16239	16239
query23_1	16439	16324	16426	16324
query24	7533	1802	1313	1313
query24_1	1312	1290	1338	1290
query25	549	521	454	454
query26	1308	330	174	174
query27	2712	565	344	344
query28	4538	2044	2039	2039
query29	1015	663	529	529
query30	314	245	206	206
query31	1146	1104	960	960
query32	92	75	74	74
query33	568	383	328	328
query34	1204	1151	656	656
query35	811	807	738	738
query36	1431	1437	1223	1223
query37	149	106	87	87
query38	3222	3175	3051	3051
query39	929	948	902	902
query39_1	877	883	862	862
query40	226	147	122	122
query41	64	62	63	62
query42	106	111	107	107
query43	330	329	295	295
query44	
query45	219	203	201	201
query46	1065	1186	740	740
query47	2402	2414	2244	2244
query48	409	413	294	294
query49	652	495	388	388
query50	994	350	255	255
query51	4351	4359	4235	4235
query52	106	107	94	94
query53	246	282	206	206
query54	316	277	248	248
query55	93	91	85	85
query56	299	296	316	296
query57	1458	1426	1342	1342
query58	295	266	268	266
query59	1603	1652	1451	1451
query60	315	316	304	304
query61	164	149	156	149
query62	697	654	582	582
query63	246	204	213	204
query64	2442	797	648	648
query65	
query66	1702	481	359	359
query67	30072	30000	30150	30000
query68	
query69	519	345	298	298
query70	967	990	996	990
query71	304	270	253	253
query72	3003	2753	2432	2432
query73	856	795	415	415
query74	5102	4952	4796	4796
query75	2717	2609	2309	2309
query76	2310	1156	804	804
query77	407	398	343	343
query78	12303	12350	11832	11832
query79	1293	1066	762	762
query80	586	554	446	446
query81	448	279	247	247
query82	244	163	116	116
query83	276	273	245	245
query84	280	139	108	108
query85	869	541	465	465
query86	357	333	325	325
query87	3439	3363	3251	3251
query88	3608	2793	2755	2755
query89	419	391	344	344
query90	2168	183	181	181
query91	183	166	145	145
query92	79	77	79	77
query93	1362	1532	849	849
query94	526	332	318	318
query95	681	473	345	345
query96	1072	798	344	344
query97	2734	2719	2636	2636
query98	237	227	235	227
query99	1182	1157	1034	1034
Total cold run time: 253116 ms
Total hot run time: 172519 ms

@Mryange
Copy link
Copy Markdown
Contributor Author

Mryange commented May 25, 2026

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Automated review summary:

No blocking findings. The PR is a narrowly scoped replacement of removed assume_mutable() calls with assert_mutable() in BE array-view benchmarks/tests.

Critical checkpoints:

  • Goal/test: accomplishes the build-fix goal for these benchmark/test helpers; existing ColumnArrayViewTest covers nullable array helper paths, but I did not run BE UT in this runner.
  • Scope: minimal and focused.
  • COW/lifecycle: assert_mutable() is used on freshly created local columns at the reviewed call sites; benchmark helpers retain read-only aliases after wrapping, which is safe for current read-only use.
  • Concurrency: none involved.
  • Config/compatibility/persistence/transactions/data writes/FE-BE variables: not applicable.
  • Parallel paths: all remaining assume_mutable() references in the repo are removed.
  • Tests/results: no expected result files changed; no handwritten results.
  • Observability/performance: not applicable; no runtime performance regression expected from these benchmark/test helper changes.
  • User focus: no additional user-provided review focus; no extra issues found.

Validation performed: inspected the PR diff and relevant COW/ColumnNullable/ColumnArrayView code paths, checked existing review context, and ran git diff --check.

@Mryange
Copy link
Copy Markdown
Contributor Author

Mryange commented May 25, 2026

run buildall

@Mryange
Copy link
Copy Markdown
Contributor Author

Mryange commented May 25, 2026

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Code review completed. I did not find blocking issues in this PR.

Critical checkpoint conclusions:

  • Goal/test proof: The PR removes remaining assume_mutable() usage from the changed ColumnArrayView benchmark/test code. The changed test helpers now use the shared ColumnNullable::create(ColumnPtr, ColumnPtr) path, which matches the COW API. No test execution was performed in this runner.
  • Scope: The modification is small and focused on the affected benchmark and BE unit-test sources.
  • Concurrency/lifecycle/config/compatibility: No new concurrency, lifecycle ownership beyond existing COW column references, configuration, persistence, protocol, storage-format, or compatibility changes are introduced.
  • Parallel paths: Repository search found no remaining assume_mutable uses in C++ sources.
  • COW semantics: The new test-helper path avoids forcing mutable ownership when wrapping an existing column. The benchmark changes use assert_mutable() only on freshly built local columns at current call sites, so the unique-owner precondition is satisfied.
  • Test coverage: Existing ColumnArrayViewTest coverage remains applicable, but I did not run BE UTs locally.
  • Observability/performance: No runtime user-facing path, logging, metric, or performance-sensitive behavior change beyond benchmark setup code.

User focus: No additional user-provided review focus was present.

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label May 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

@github-actions
Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31802 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 3bba7e9cc1c7e76f25a1cc54a5ad38908c2555f4, 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	17731	4100	4081	4081
q2	q3	10820	1393	844	844
q4	4694	479	343	343
q5	7582	2229	2092	2092
q6	241	184	143	143
q7	935	777	650	650
q8	9357	1661	1530	1530
q9	5178	4993	5012	4993
q10	6401	2196	1891	1891
q11	439	282	253	253
q12	634	419	302	302
q13	18132	3396	2804	2804
q14	268	261	247	247
q15	q16	820	779	713	713
q17	966	931	913	913
q18	6928	5839	5688	5688
q19	1285	1242	1083	1083
q20	685	437	315	315
q21	6178	2886	2591	2591
q22	552	412	326	326
Total cold run time: 99826 ms
Total hot run time: 31802 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	5254	4988	5033	4988
q2	q3	4902	5253	4662	4662
q4	2225	2243	1442	1442
q5	4998	4781	4677	4677
q6	237	191	140	140
q7	2013	1799	1595	1595
q8	2568	2221	2173	2173
q9	8150	7414	7496	7414
q10	4780	4692	4235	4235
q11	557	429	379	379
q12	746	753	549	549
q13	3072	3414	2818	2818
q14	292	290	259	259
q15	q16	700	709	613	613
q17	1323	1300	1281	1281
q18	7325	6851	6839	6839
q19	1142	1081	1121	1081
q20	2245	2222	1962	1962
q21	5439	4684	4578	4578
q22	560	469	441	441
Total cold run time: 58528 ms
Total hot run time: 52126 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 173146 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 3bba7e9cc1c7e76f25a1cc54a5ad38908c2555f4, data reload: false

query5	4310	678	528	528
query6	339	218	203	203
query7	4238	593	316	316
query8	339	235	225	225
query9	8826	4163	4139	4139
query10	457	340	297	297
query11	5761	2385	2268	2268
query12	184	140	126	126
query13	1277	673	450	450
query14	6174	5576	5244	5244
query14_1	4526	4505	4445	4445
query15	214	208	189	189
query16	987	451	434	434
query17	1147	730	586	586
query18	2451	499	367	367
query19	221	203	172	172
query20	141	134	132	132
query21	216	138	119	119
query22	13655	13560	13386	13386
query23	17467	16592	16183	16183
query23_1	16424	16527	16382	16382
query24	7599	1795	1351	1351
query24_1	1332	1320	1338	1320
query25	572	475	413	413
query26	1319	339	175	175
query27	2682	559	340	340
query28	4453	2041	2046	2041
query29	989	659	509	509
query30	311	249	204	204
query31	1137	1080	962	962
query32	98	78	82	78
query33	554	361	301	301
query34	1198	1164	680	680
query35	790	811	714	714
query36	1427	1467	1304	1304
query37	161	111	91	91
query38	3224	3176	3094	3094
query39	936	939	893	893
query39_1	891	892	874	874
query40	230	156	133	133
query41	74	71	72	71
query42	115	115	115	115
query43	337	335	299	299
query44	
query45	216	206	202	202
query46	1087	1212	737	737
query47	2368	2416	2267	2267
query48	417	411	314	314
query49	656	519	408	408
query50	1024	378	266	266
query51	4354	4282	4277	4277
query52	112	110	99	99
query53	277	305	215	215
query54	338	306	282	282
query55	103	93	91	91
query56	323	319	325	319
query57	1449	1432	1354	1354
query58	313	290	294	290
query59	1637	1700	1410	1410
query60	348	340	325	325
query61	185	182	182	182
query62	696	665	581	581
query63	242	201	229	201
query64	2462	779	632	632
query65	
query66	1729	474	360	360
query67	30198	30188	29914	29914
query68	
query69	489	351	304	304
query70	1107	1018	1017	1017
query71	330	305	274	274
query72	2984	2728	2447	2447
query73	866	768	435	435
query74	5114	4989	4803	4803
query75	2684	2653	2279	2279
query76	2318	1182	779	779
query77	413	416	345	345
query78	12644	12533	11923	11923
query79	1473	1067	765	765
query80	666	538	448	448
query81	460	282	242	242
query82	1380	167	122	122
query83	364	277	254	254
query84	267	142	110	110
query85	911	567	464	464
query86	420	336	330	330
query87	3435	3393	3265	3265
query88	3698	2884	2818	2818
query89	443	411	344	344
query90	1965	182	199	182
query91	179	169	146	146
query92	77	83	76	76
query93	1499	1456	890	890
query94	570	375	332	332
query95	686	503	362	362
query96	1105	773	364	364
query97	2767	2751	2603	2603
query98	236	238	236	236
query99	1150	1174	1033	1033
Total cold run time: 256029 ms
Total hot run time: 173146 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

skip buildall

@hello-stephen hello-stephen merged commit f6a4f02 into apache:master May 25, 2026
32 of 33 checks passed
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.

3 participants