Skip to content

Conversation

@Mryange
Copy link
Contributor

@Mryange Mryange commented Nov 4, 2025

What problem does this PR solve?

Our expr is actually a const function; any mutable data must be stored in VExprContext. Currently only VRuntimeFilterWrapper contains mutable data (because it needs to check the filter rate).

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
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
Contributor Author

Mryange commented Nov 4, 2025

run buildall

@doris-robot
Copy link

TPC-DS: Total hot run time: 189652 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 acf83a872dba18eee8f7a2a143ce316b39f0816d, data reload: false

query1	1055	402	389	389
query2	6566	1676	1711	1676
query3	6759	224	230	224
query4	26949	23485	23508	23485
query5	5181	631	436	436
query6	338	238	227	227
query7	4655	493	295	295
query8	329	256	246	246
query9	8703	2586	2588	2586
query10	537	350	295	295
query11	16267	15052	14902	14902
query12	185	121	117	117
query13	1698	572	459	459
query14	11374	9290	9254	9254
query15	198	192	175	175
query16	7901	738	523	523
query17	1388	882	672	672
query18	2198	465	348	348
query19	222	209	206	206
query20	144	131	130	130
query21	217	131	117	117
query22	4453	4664	4628	4628
query23	34417	33763	33594	33594
query24	8572	2535	2463	2463
query25	605	529	497	497
query26	1286	281	161	161
query27	3187	526	358	358
query28	4558	2230	2214	2214
query29	808	646	531	531
query30	346	267	195	195
query31	970	884	778	778
query32	81	75	75	75
query33	598	379	321	321
query34	814	869	522	522
query35	784	811	766	766
query36	925	1011	890	890
query37	122	112	85	85
query38	3503	3548	3487	3487
query39	1498	1426	1435	1426
query40	216	125	117	117
query41	78	68	67	67
query42	126	109	113	109
query43	482	503	466	466
query44	1230	750	733	733
query45	181	182	173	173
query46	881	995	636	636
query47	1727	1804	1707	1707
query48	390	443	318	318
query49	779	534	421	421
query50	672	692	404	404
query51	3884	3950	3894	3894
query52	106	109	95	95
query53	237	261	202	202
query54	312	293	287	287
query55	84	81	85	81
query56	333	324	295	295
query57	1169	1195	1122	1122
query58	295	279	270	270
query59	2559	2656	2556	2556
query60	345	341	332	332
query61	165	160	159	159
query62	808	732	677	677
query63	224	193	198	193
query64	4469	1151	952	952
query65	4035	3944	3971	3944
query66	1112	467	359	359
query67	15499	15007	14845	14845
query68	7987	878	597	597
query69	497	337	305	305
query70	1376	1328	1230	1230
query71	456	355	339	339
query72	5990	4943	4881	4881
query73	655	569	357	357
query74	8979	9086	8896	8896
query75	3345	3368	2880	2880
query76	3334	1172	735	735
query77	512	419	331	331
query78	9589	9683	8869	8869
query79	2495	834	603	603
query80	713	569	494	494
query81	520	258	224	224
query82	473	162	132	132
query83	262	263	249	249
query84	257	115	95	95
query85	934	480	435	435
query86	387	286	296	286
query87	3712	3742	3623	3623
query88	4104	2265	2236	2236
query89	399	334	297	297
query90	2071	232	243	232
query91	163	171	135	135
query92	85	68	62	62
query93	2146	987	641	641
query94	728	450	347	347
query95	400	312	320	312
query96	493	571	283	283
query97	2922	2976	2896	2896
query98	253	209	213	209
query99	1344	1399	1274	1274
Total cold run time: 280370 ms
Total hot run time: 189652 ms

@doris-robot
Copy link

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

query1	0.05	0.05	0.05
query2	0.08	0.05	0.05
query3	0.25	0.08	0.08
query4	1.61	0.12	0.12
query5	0.28	0.26	0.25
query6	1.20	0.65	0.64
query7	0.03	0.02	0.03
query8	0.05	0.04	0.04
query9	0.60	0.53	0.52
query10	0.58	0.58	0.57
query11	0.16	0.11	0.12
query12	0.16	0.12	0.13
query13	0.62	0.60	0.60
query14	1.01	0.98	1.00
query15	0.86	0.82	0.84
query16	0.40	0.40	0.43
query17	1.04	1.04	1.00
query18	0.21	0.20	0.20
query19	1.90	1.76	1.77
query20	0.02	0.01	0.01
query21	15.44	0.17	0.13
query22	5.22	0.06	0.04
query23	15.66	0.28	0.09
query24	3.28	0.56	0.74
query25	0.09	0.06	0.06
query26	0.15	0.13	0.14
query27	0.07	0.05	0.05
query28	5.27	1.14	0.93
query29	12.58	3.89	3.22
query30	0.28	0.13	0.12
query31	2.82	0.59	0.38
query32	3.23	0.56	0.46
query33	3.05	3.01	3.05
query34	15.74	5.18	4.55
query35	4.56	4.63	4.62
query36	0.67	0.50	0.49
query37	0.10	0.07	0.07
query38	0.06	0.04	0.04
query39	0.03	0.03	0.03
query40	0.17	0.14	0.14
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 99.74 s
Total hot run time: 27.56 s

@Mryange Mryange force-pushed the mark-expr-exec-const branch from acf83a8 to 2f68403 Compare November 4, 2025 11:09
@Mryange
Copy link
Contributor Author

Mryange commented Nov 4, 2025

run buildall

@doris-robot
Copy link

TPC-DS: Total hot run time: 189314 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 2f68403cd52c4cd9466f74a03e57b3855ea6a6e0, data reload: false

query1	1068	403	392	392
query2	6590	1681	1679	1679
query3	6747	230	219	219
query4	26792	23413	23249	23249
query5	4468	644	483	483
query6	347	244	232	232
query7	4659	493	308	308
query8	306	257	252	252
query9	8740	2576	2581	2576
query10	506	344	287	287
query11	15673	15081	14884	14884
query12	194	118	116	116
query13	1701	571	462	462
query14	11542	9270	9280	9270
query15	200	190	183	183
query16	7696	695	534	534
query17	1344	790	627	627
query18	2045	450	358	358
query19	230	223	216	216
query20	142	143	133	133
query21	244	141	127	127
query22	4607	4662	4461	4461
query23	34448	33919	33850	33850
query24	8449	2454	2478	2454
query25	617	560	487	487
query26	1341	292	163	163
query27	2908	535	349	349
query28	4498	2268	2224	2224
query29	885	626	492	492
query30	310	231	203	203
query31	964	842	755	755
query32	79	68	69	68
query33	662	409	329	329
query34	819	871	555	555
query35	838	879	786	786
query36	972	1041	894	894
query37	143	108	129	108
query38	3807	3685	3575	3575
query39	1549	1397	1387	1387
query40	222	126	114	114
query41	59	58	59	58
query42	126	106	109	106
query43	488	483	465	465
query44	1213	748	721	721
query45	183	176	172	172
query46	942	984	631	631
query47	1745	1827	1725	1725
query48	387	421	321	321
query49	748	511	412	412
query50	633	686	401	401
query51	3899	3940	3903	3903
query52	113	113	104	104
query53	237	261	193	193
query54	305	291	272	272
query55	87	84	87	84
query56	307	317	298	298
query57	1153	1185	1107	1107
query58	276	270	273	270
query59	2590	2643	2491	2491
query60	363	346	317	317
query61	160	152	154	152
query62	793	728	660	660
query63	225	187	186	186
query64	4418	1152	877	877
query65	4029	3943	3945	3943
query66	1111	425	344	344
query67	15423	15165	14907	14907
query68	8398	924	594	594
query69	490	323	287	287
query70	1353	1241	1278	1241
query71	528	356	326	326
query72	5839	4866	4937	4866
query73	647	556	359	359
query74	8849	9116	9029	9029
query75	4012	3329	2777	2777
query76	3698	1159	722	722
query77	820	420	318	318
query78	9653	9628	8832	8832
query79	2023	830	597	597
query80	640	559	509	509
query81	509	262	229	229
query82	474	162	127	127
query83	265	257	243	243
query84	252	109	93	93
query85	894	470	433	433
query86	390	307	304	304
query87	3685	3721	3633	3633
query88	3725	2275	2224	2224
query89	387	340	291	291
query90	2016	213	217	213
query91	175	170	134	134
query92	76	69	66	66
query93	1738	969	632	632
query94	687	430	315	315
query95	402	322	311	311
query96	479	575	277	277
query97	2945	2984	2847	2847
query98	238	213	204	204
query99	1455	1424	1320	1320
Total cold run time: 279107 ms
Total hot run time: 189314 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.05
query2	0.09	0.05	0.05
query3	0.25	0.08	0.08
query4	1.61	0.11	0.12
query5	0.26	0.25	0.26
query6	1.17	0.65	0.64
query7	0.03	0.03	0.02
query8	0.05	0.04	0.04
query9	0.59	0.52	0.52
query10	0.58	0.57	0.57
query11	0.16	0.11	0.10
query12	0.14	0.12	0.13
query13	0.62	0.60	0.59
query14	1.01	1.00	1.01
query15	0.84	0.83	0.84
query16	0.40	0.39	0.39
query17	1.02	1.02	1.03
query18	0.21	0.23	0.19
query19	1.94	1.80	1.84
query20	0.02	0.01	0.01
query21	15.44	0.19	0.13
query22	5.06	0.07	0.04
query23	15.64	0.25	0.10
query24	2.83	0.49	0.79
query25	0.07	0.06	0.07
query26	0.15	0.13	0.12
query27	0.06	0.06	0.05
query28	4.92	1.13	0.91
query29	12.57	3.88	3.21
query30	0.28	0.14	0.11
query31	2.81	0.59	0.38
query32	3.23	0.55	0.46
query33	3.02	3.00	3.07
query34	15.89	5.15	4.53
query35	4.61	4.61	4.58
query36	0.68	0.50	0.50
query37	0.10	0.07	0.07
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.15	0.15
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.05	0.04	0.03
Total cold run time: 98.86 s
Total hot run time: 27.43 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 35.14% (13/37) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.73% (18083/34294)
Line Coverage 38.04% (164460/432296)
Region Coverage 32.36% (125338/387299)
Branch Coverage 33.80% (54888/162402)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 91.89% (34/37) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.20% (24004/33713)
Line Coverage 57.59% (249379/433041)
Region Coverage 52.36% (205734/392895)
Branch Coverage 54.31% (88800/163511)

@Mryange
Copy link
Contributor Author

Mryange commented Nov 5, 2025

run buildall

@doris-robot
Copy link

TPC-DS: Total hot run time: 189964 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 2f68403cd52c4cd9466f74a03e57b3855ea6a6e0, data reload: false

query1	1019	412	386	386
query2	6552	1666	1693	1666
query3	6761	222	218	218
query4	26316	24127	23218	23218
query5	5153	638	476	476
query6	345	247	236	236
query7	4657	501	299	299
query8	315	274	266	266
query9	8747	2576	2557	2557
query10	546	334	298	298
query11	15590	15094	14900	14900
query12	201	123	115	115
query13	1702	578	452	452
query14	11623	9602	9697	9602
query15	221	197	177	177
query16	7723	656	524	524
query17	1611	761	604	604
query18	2081	459	375	375
query19	254	228	215	215
query20	147	136	127	127
query21	280	135	116	116
query22	4525	4508	4711	4508
query23	34653	33558	33645	33558
query24	9526	2539	2549	2539
query25	622	512	464	464
query26	1240	279	161	161
query27	2823	531	360	360
query28	4371	2218	2230	2218
query29	798	670	529	529
query30	322	242	197	197
query31	1016	848	782	782
query32	78	74	79	74
query33	585	416	331	331
query34	836	894	537	537
query35	932	857	757	757
query36	989	1034	955	955
query37	120	107	84	84
query38	3519	3614	3454	3454
query39	1458	1408	1407	1407
query40	217	132	111	111
query41	59	58	56	56
query42	124	108	107	107
query43	490	492	445	445
query44	1202	736	736	736
query45	187	178	177	177
query46	875	990	636	636
query47	1742	1747	1692	1692
query48	397	438	329	329
query49	803	524	445	445
query50	656	686	418	418
query51	3872	3992	3999	3992
query52	117	112	104	104
query53	239	275	200	200
query54	343	312	298	298
query55	91	89	84	84
query56	335	356	333	333
query57	1183	1176	1107	1107
query58	302	300	288	288
query59	2564	2702	2574	2574
query60	367	360	355	355
query61	197	179	184	179
query62	774	729	672	672
query63	235	193	195	193
query64	4574	1265	969	969
query65	4069	3953	3930	3930
query66	1079	448	328	328
query67	15342	15244	14864	14864
query68	8599	928	600	600
query69	514	325	297	297
query70	1365	1255	1243	1243
query71	521	340	314	314
query72	6029	4935	4921	4921
query73	710	583	357	357
query74	8789	9206	8934	8934
query75	4047	3306	2857	2857
query76	3839	1145	733	733
query77	828	411	311	311
query78	9473	9721	8960	8960
query79	2422	836	596	596
query80	675	554	502	502
query81	478	266	227	227
query82	430	164	128	128
query83	301	278	259	259
query84	302	110	94	94
query85	893	466	432	432
query86	347	296	306	296
query87	3742	3728	3618	3618
query88	3341	2284	2234	2234
query89	387	326	291	291
query90	2022	221	223	221
query91	177	166	134	134
query92	80	68	66	66
query93	1365	950	643	643
query94	700	428	342	342
query95	408	324	314	314
query96	492	589	286	286
query97	2937	2971	2875	2875
query98	247	220	216	216
query99	1441	1417	1299	1299
Total cold run time: 280593 ms
Total hot run time: 189964 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.05
query2	0.08	0.04	0.04
query3	0.26	0.09	0.09
query4	1.60	0.11	0.12
query5	0.30	0.25	0.26
query6	1.16	0.64	0.64
query7	0.04	0.03	0.03
query8	0.07	0.04	0.04
query9	0.59	0.53	0.52
query10	0.58	0.57	0.58
query11	0.17	0.11	0.12
query12	0.15	0.12	0.11
query13	0.62	0.61	0.60
query14	1.00	0.99	1.00
query15	0.86	0.83	0.84
query16	0.40	0.40	0.38
query17	1.00	1.02	1.05
query18	0.21	0.20	0.20
query19	1.89	1.85	1.80
query20	0.02	0.01	0.01
query21	15.45	0.20	0.12
query22	5.03	0.07	0.05
query23	15.71	0.26	0.10
query24	2.62	0.77	0.31
query25	0.07	0.05	0.06
query26	0.15	0.12	0.12
query27	0.06	0.05	0.06
query28	3.74	1.13	0.94
query29	12.58	3.89	3.29
query30	0.28	0.13	0.12
query31	2.82	0.60	0.38
query32	3.25	0.54	0.47
query33	3.05	3.04	3.16
query34	15.84	5.17	4.53
query35	4.51	4.60	4.60
query36	0.71	0.51	0.49
query37	0.10	0.07	0.07
query38	0.07	0.04	0.04
query39	0.03	0.03	0.03
query40	0.18	0.13	0.13
query41	0.09	0.04	0.03
query42	0.04	0.03	0.03
query43	0.05	0.04	0.04
Total cold run time: 97.48 s
Total hot run time: 27.41 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 35.14% (13/37) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.71% (18086/34310)
Line Coverage 38.05% (164516/432367)
Region Coverage 32.39% (125455/387317)
Branch Coverage 33.81% (54904/162402)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 91.89% (34/37) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.16% (24001/33729)
Line Coverage 57.56% (249285/433112)
Region Coverage 52.35% (205672/392913)
Branch Coverage 54.29% (88763/163511)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 91.89% (34/37) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.19% (24010/33729)
Line Coverage 57.60% (249454/433112)
Region Coverage 52.40% (205877/392913)
Branch Coverage 54.33% (88841/163511)

1 similar comment
@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 91.89% (34/37) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.19% (24010/33729)
Line Coverage 57.60% (249454/433112)
Region Coverage 52.40% (205877/392913)
Branch Coverage 54.33% (88841/163511)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 91.89% (34/37) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.47% (24107/33729)
Line Coverage 57.91% (250829/433112)
Region Coverage 52.81% (207508/392913)
Branch Coverage 54.65% (89361/163511)

Copy link
Contributor

@BiteTheDDDDt BiteTheDDDDt 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 Nov 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

PR approved by anyone and no changes requested.

@yiguolei yiguolei merged commit 4ca9942 into apache:master Nov 6, 2025
27 of 28 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 6, 2025
### What problem does this PR solve?


Our expr is actually a const function; any mutable data must be stored
in VExprContext. Currently only VRuntimeFilterWrapper contains mutable
data (because it needs to check the filter rate).

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [x] No need to test or manual test. Explain why:
- [x] 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 <!-- Add your reason?  -->

- Behavior changed:
    - [x] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
yiguolei pushed a commit that referenced this pull request Nov 8, 2025
…7668 (#57765)

Cherry-picked from #57668

Co-authored-by: Mryange <2319153948@qq.com>
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Nov 18, 2025
### What problem does this PR solve?


Our expr is actually a const function; any mutable data must be stored
in VExprContext. Currently only VRuntimeFilterWrapper contains mutable
data (because it needs to check the filter rate).

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [x] No need to test or manual test. Explain why:
- [x] 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 <!-- Add your reason?  -->

- Behavior changed:
    - [x] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
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. dev/4.0.2-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants