Skip to content

Conversation

@zzzxl1993
Copy link
Contributor

@zzzxl1993 zzzxl1993 commented Dec 1, 2025

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

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

@zzzxl1993 zzzxl1993 requested a review from zclllyybb as a code owner December 1, 2025 03:06
@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?

Copy link
Contributor

@zclllyybb zclllyybb left a comment

Choose a reason for hiding this comment

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

do we need some tests?

@zzzxl1993
Copy link
Contributor Author

do we need some tests?

Temporary commit, code is not yet complete.

@zzzxl1993
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17630	4155	4040	4040
q2	2009	374	244	244
q3	10168	1326	727	727
q4	10217	896	313	313
q5	7921	2128	1966	1966
q6	234	168	135	135
q7	1008	844	708	708
q8	9366	1497	1117	1117
q9	7239	5320	5376	5320
q10	6866	2405	1946	1946
q11	523	308	299	299
q12	711	752	560	560
q13	17782	3650	3017	3017
q14	300	299	288	288
q15	589	509	511	509
q16	691	679	621	621
q17	700	843	499	499
q18	8099	7724	7734	7724
q19	1093	1026	679	679
q20	418	387	245	245
q21	4670	4152	4223	4152
q22	1103	1067	1029	1029
Total cold run time: 109337 ms
Total hot run time: 36138 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4282	4254	4353	4254
q2	342	420	324	324
q3	2566	2869	2512	2512
q4	1385	1826	1515	1515
q5	4707	4318	4583	4318
q6	212	169	125	125
q7	2035	1929	1797	1797
q8	2631	2515	2520	2515
q9	7502	7787	7401	7401
q10	2957	3105	2684	2684
q11	567	495	485	485
q12	632	687	548	548
q13	3303	3678	3070	3070
q14	258	272	254	254
q15	539	491	495	491
q16	618	638	609	609
q17	1147	1432	1373	1373
q18	7250	7232	7164	7164
q19	828	815	806	806
q20	1908	1951	1828	1828
q21	4673	4273	4213	4213
q22	1076	1023	989	989
Total cold run time: 51418 ms
Total hot run time: 49275 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 179060 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 431d2bfe548b282d78b25a83cffcc22088206860, data reload: false

query5	4793	602	456	456
query6	327	234	217	217
query7	4233	471	272	272
query8	328	270	252	252
query9	8778	2576	2545	2545
query10	493	382	336	336
query11	15387	15148	14843	14843
query12	176	122	116	116
query13	1257	504	398	398
query14	6304	3348	2751	2751
query14_1	2658	2613	2593	2593
query15	204	193	177	177
query16	777	491	439	439
query17	1082	680	572	572
query18	2573	439	347	347
query19	226	228	202	202
query20	118	114	111	111
query21	218	140	119	119
query22	3906	3910	3925	3910
query23	16641	16302	15898	15898
query23_1	16046	16116	16178	16116
query24	7396	1685	1239	1239
query24_1	1272	1255	1251	1251
query25	594	510	459	459
query26	1259	273	169	169
query27	2760	473	316	316
query28	4481	2128	2133	2128
query29	852	575	464	464
query30	323	252	222	222
query31	837	703	654	654
query32	88	71	75	71
query33	561	336	314	314
query34	898	905	552	552
query35	795	814	730	730
query36	849	915	839	839
query37	147	94	84	84
query38	2855	2874	2814	2814
query39	768	772	715	715
query39_1	701	710	720	710
query40	230	143	124	124
query41	88	71	69	69
query42	109	105	104	104
query43	424	440	403	403
query44	1319	757	745	745
query45	197	193	189	189
query46	881	981	616	616
query47	1672	1682	1601	1601
query48	320	331	258	258
query49	652	453	373	373
query50	667	300	226	226
query51	3868	3847	3821	3821
query52	108	111	104	104
query53	333	354	297	297
query54	305	272	256	256
query55	80	79	77	77
query56	321	309	318	309
query57	1146	1146	1077	1077
query58	287	268	258	258
query59	2417	2509	2378	2378
query60	330	330	310	310
query61	230	161	165	161
query62	695	683	614	614
query63	318	294	298	294
query64	4966	1313	1028	1028
query65	4012	3929	3920	3920
query66	1421	443	310	310
query67	15237	14891	14709	14709
query68	8357	1002	723	723
query69	503	350	306	306
query70	1102	1001	1009	1001
query71	353	297	278	278
query72	6076	5057	5194	5057
query73	686	611	307	307
query74	8903	8795	8736	8736
query75	3235	3188	2850	2850
query76	3855	1120	714	714
query77	536	388	293	293
query78	9432	9633	8926	8926
query79	1679	891	624	624
query80	755	657	576	576
query81	528	271	233	233
query82	287	136	108	108
query83	260	256	242	242
query84	255	123	106	106
query85	926	525	459	459
query86	392	311	275	275
query87	3066	3079	2987	2987
query88	3314	2299	2299	2299
query89	456	426	411	411
query90	2134	164	160	160
query91	174	163	143	143
query92	77	68	67	67
query93	1420	917	573	573
query94	484	343	277	277
query95	582	336	310	310
query96	599	483	211	211
query97	2247	2314	2235	2235
query98	216	194	195	194
query99	1289	1299	1209	1209
Total cold run time: 260393 ms
Total hot run time: 179060 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.05
query2	0.10	0.05	0.04
query3	0.26	0.09	0.08
query4	1.63	0.12	0.11
query5	0.28	0.26	0.27
query6	1.15	0.64	0.62
query7	0.03	0.02	0.02
query8	0.06	0.05	0.04
query9	0.57	0.50	0.50
query10	0.56	0.55	0.55
query11	0.15	0.11	0.11
query12	0.16	0.12	0.13
query13	0.63	0.60	0.60
query14	0.99	1.00	0.96
query15	0.82	0.80	0.79
query16	0.40	0.39	0.40
query17	1.03	0.96	1.06
query18	0.24	0.21	0.21
query19	1.85	1.83	1.84
query20	0.02	0.01	0.01
query21	15.43	0.30	0.15
query22	4.96	0.06	0.05
query23	16.10	0.28	0.10
query24	1.46	0.42	0.41
query25	0.09	0.07	0.05
query26	0.14	0.13	0.14
query27	0.09	0.05	0.07
query28	4.61	1.22	1.02
query29	12.62	4.04	3.27
query30	0.28	0.14	0.12
query31	2.82	0.64	0.40
query32	3.23	0.56	0.46
query33	3.00	3.02	3.01
query34	16.79	5.17	4.56
query35	4.55	4.63	4.48
query36	0.67	0.50	0.49
query37	0.11	0.08	0.06
query38	0.06	0.04	0.04
query39	0.05	0.03	0.03
query40	0.18	0.15	0.13
query41	0.08	0.04	0.03
query42	0.04	0.03	0.02
query43	0.04	0.03	0.04
Total cold run time: 98.39 s
Total hot run time: 27.34 s

@zzzxl1993
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17669	4192	4086	4086
q2	2034	349	244	244
q3	10154	1392	766	766
q4	10235	896	319	319
q5	7512	2159	1936	1936
q6	182	175	135	135
q7	998	854	723	723
q8	9358	1485	1217	1217
q9	7142	5315	5362	5315
q10	6850	2412	1967	1967
q11	523	326	297	297
q12	683	738	573	573
q13	17809	3709	3096	3096
q14	292	302	272	272
q15	587	524	512	512
q16	696	687	622	622
q17	689	806	596	596
q18	7677	7272	7103	7103
q19	1109	958	603	603
q20	409	366	253	253
q21	4372	4071	3812	3812
q22	1046	989	967	967
Total cold run time: 108026 ms
Total hot run time: 35414 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4110	4071	4070	4070
q2	329	421	315	315
q3	2175	2672	2280	2280
q4	1347	1773	1302	1302
q5	4270	4814	4636	4636
q6	220	179	132	132
q7	2044	1979	1848	1848
q8	2686	2675	2645	2645
q9	7972	7519	7623	7519
q10	3140	3293	2830	2830
q11	610	511	501	501
q12	674	754	614	614
q13	3529	4104	3453	3453
q14	289	318	288	288
q15	547	502	504	502
q16	647	691	626	626
q17	1133	1365	1454	1365
q18	8091	7620	7626	7620
q19	920	832	886	832
q20	2005	2148	1946	1946
q21	4906	4568	4317	4317
q22	1087	1036	995	995
Total cold run time: 52731 ms
Total hot run time: 50636 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 178707 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 31ac2b6dcf1edfe7ccf1a40eacf4aec6d5b08abe, data reload: false

query5	4567	586	452	452
query6	359	224	202	202
query7	4217	489	278	278
query8	309	267	243	243
query9	8795	2531	2530	2530
query10	504	381	351	351
query11	15290	14771	14683	14683
query12	187	117	116	116
query13	1270	515	417	417
query14	5843	3109	2764	2764
query14_1	2691	2642	2657	2642
query15	211	202	179	179
query16	887	457	455	455
query17	1136	745	621	621
query18	2459	481	334	334
query19	224	220	195	195
query20	119	116	110	110
query21	215	144	115	115
query22	3911	3967	3751	3751
query23	16626	16091	15862	15862
query23_1	15956	16054	15915	15915
query24	7309	1652	1223	1223
query24_1	1246	1200	1250	1200
query25	549	476	420	420
query26	1247	272	156	156
query27	2750	470	302	302
query28	4473	2131	2125	2125
query29	796	537	444	444
query30	320	251	216	216
query31	843	704	623	623
query32	78	75	66	66
query33	523	335	277	277
query34	901	919	538	538
query35	780	831	742	742
query36	860	912	816	816
query37	128	88	81	81
query38	2898	2908	2845	2845
query39	740	733	709	709
query39_1	694	686	719	686
query40	220	140	127	127
query41	68	63	62	62
query42	108	107	105	105
query43	450	431	437	431
query44	1327	746	742	742
query45	189	192	180	180
query46	893	994	620	620
query47	1658	1710	1656	1656
query48	315	327	279	279
query49	634	447	348	348
query50	665	296	227	227
query51	3849	3815	3873	3815
query52	104	107	98	98
query53	316	357	294	294
query54	280	252	251	251
query55	76	71	71	71
query56	282	295	295	295
query57	1150	1151	1087	1087
query58	269	249	257	249
query59	2442	2526	2464	2464
query60	320	307	288	288
query61	158	161	157	157
query62	698	672	633	633
query63	335	294	297	294
query64	5075	1362	1012	1012
query65	4010	3939	3938	3938
query66	1483	445	316	316
query67	15083	15099	14968	14968
query68	2719	1044	774	774
query69	457	350	310	310
query70	1059	1007	960	960
query71	312	297	278	278
query72	6160	4990	5337	4990
query73	550	654	318	318
query74	8798	8824	8750	8750
query75	3156	3209	2836	2836
query76	2861	1127	706	706
query77	373	412	302	302
query78	9513	9612	8834	8834
query79	1061	885	617	617
query80	937	684	590	590
query81	516	275	237	237
query82	207	135	112	112
query83	373	271	248	248
query84	262	129	110	110
query85	1137	575	457	457
query86	354	318	287	287
query87	3061	3064	3034	3034
query88	3290	2320	2305	2305
query89	491	430	397	397
query90	1781	162	160	160
query91	176	169	144	144
query92	73	69	66	66
query93	997	939	569	569
query94	436	319	290	290
query95	579	339	370	339
query96	608	490	220	220
query97	2287	2317	2237	2237
query98	213	192	189	189
query99	1280	1294	1238	1238
Total cold run time: 251356 ms
Total hot run time: 178707 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.05
query2	0.10	0.05	0.04
query3	0.26	0.09	0.09
query4	1.61	0.12	0.11
query5	0.26	0.27	0.27
query6	1.16	0.65	0.63
query7	0.04	0.02	0.03
query8	0.06	0.04	0.05
query9	0.57	0.50	0.51
query10	0.55	0.56	0.54
query11	0.16	0.11	0.11
query12	0.15	0.12	0.12
query13	0.62	0.60	0.61
query14	0.98	0.98	0.98
query15	0.82	0.80	0.81
query16	0.43	0.39	0.42
query17	1.03	1.02	1.00
query18	0.23	0.22	0.21
query19	1.85	1.77	1.85
query20	0.02	0.02	0.01
query21	15.44	0.31	0.14
query22	5.01	0.05	0.05
query23	15.92	0.28	0.10
query24	1.58	0.47	0.27
query25	0.06	0.09	0.06
query26	0.16	0.13	0.13
query27	0.06	0.04	0.06
query28	3.94	1.23	1.03
query29	12.55	4.07	3.22
query30	0.27	0.15	0.12
query31	2.81	0.62	0.40
query32	3.23	0.54	0.45
query33	3.05	3.09	2.99
query34	17.01	5.19	4.49
query35	4.55	4.57	4.56
query36	0.66	0.50	0.50
query37	0.11	0.07	0.06
query38	0.07	0.04	0.04
query39	0.05	0.03	0.03
query40	0.17	0.15	0.14
query41	0.08	0.03	0.03
query42	0.05	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 97.82 s
Total hot run time: 27.18 s

@zzzxl1993
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17580	4227	4059	4059
q2	1996	346	249	249
q3	10192	1306	735	735
q4	10214	862	312	312
q5	7565	2143	1918	1918
q6	185	168	138	138
q7	1027	853	718	718
q8	9367	1462	1114	1114
q9	6940	5316	5332	5316
q10	6829	2367	1959	1959
q11	515	322	325	322
q12	644	724	581	581
q13	17790	3707	3035	3035
q14	280	310	273	273
q15	583	536	514	514
q16	696	667	624	624
q17	684	857	500	500
q18	7686	7540	7831	7540
q19	1107	1027	673	673
q20	412	388	250	250
q21	4522	4199	4119	4119
q22	1149	1072	1039	1039
Total cold run time: 107963 ms
Total hot run time: 35988 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4296	4307	4263	4263
q2	342	418	304	304
q3	2451	2880	2478	2478
q4	1425	1842	1453	1453
q5	4478	4477	4481	4477
q6	208	166	121	121
q7	2033	1940	1745	1745
q8	2614	2707	2480	2480
q9	7362	7552	7022	7022
q10	2895	3115	2633	2633
q11	569	495	462	462
q12	636	678	566	566
q13	3239	3637	3037	3037
q14	266	291	259	259
q15	532	497	485	485
q16	631	671	601	601
q17	1107	1465	1345	1345
q18	7299	7234	7147	7147
q19	840	777	820	777
q20	1875	1971	1810	1810
q21	4614	4249	4063	4063
q22	1106	1052	982	982
Total cold run time: 50818 ms
Total hot run time: 48510 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 178006 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 8feba37b84b961169b5143e46760e327e5a34326, data reload: false

query5	5127	586	426	426
query6	325	252	219	219
query7	4216	476	275	275
query8	325	265	270	265
query9	8777	2509	2488	2488
query10	539	386	321	321
query11	15359	14838	14723	14723
query12	176	127	119	119
query13	1259	501	396	396
query14	6364	2992	2736	2736
query14_1	2620	2611	2630	2611
query15	212	203	184	184
query16	925	462	457	457
query17	1145	734	590	590
query18	2541	454	349	349
query19	239	239	201	201
query20	121	113	116	113
query21	221	145	125	125
query22	3965	4017	4009	4009
query23	16595	16169	15953	15953
query23_1	16118	16146	15923	15923
query24	7424	1669	1236	1236
query24_1	1253	1204	1255	1204
query25	576	498	444	444
query26	1246	264	172	172
query27	2748	467	310	310
query28	4462	2103	2099	2099
query29	849	571	469	469
query30	319	259	221	221
query31	830	696	626	626
query32	80	71	66	66
query33	556	370	295	295
query34	893	914	550	550
query35	794	844	728	728
query36	857	959	824	824
query37	124	89	72	72
query38	2838	2813	2782	2782
query39	754	729	742	729
query39_1	704	708	693	693
query40	227	135	121	121
query41	64	60	61	60
query42	103	102	102	102
query43	412	423	405	405
query44	1321	746	739	739
query45	195	188	180	180
query46	877	968	606	606
query47	1652	1736	1639	1639
query48	333	323	239	239
query49	620	449	344	344
query50	647	297	210	210
query51	3739	3920	3794	3794
query52	99	107	96	96
query53	324	353	289	289
query54	279	254	248	248
query55	83	79	73	73
query56	287	291	299	291
query57	1155	1133	1056	1056
query58	270	253	254	253
query59	2411	2515	2421	2421
query60	305	305	325	305
query61	163	164	160	160
query62	718	666	634	634
query63	329	299	304	299
query64	4964	1291	994	994
query65	4058	3943	3945	3943
query66	1443	422	336	336
query67	15278	14909	14817	14817
query68	8421	989	738	738
query69	502	352	316	316
query70	1136	999	986	986
query71	365	306	273	273
query72	6072	4979	5178	4979
query73	732	676	313	313
query74	8826	8747	8695	8695
query75	3227	3174	2802	2802
query76	4031	1168	748	748
query77	538	382	291	291
query78	9468	9580	8920	8920
query79	1685	884	614	614
query80	885	654	564	564
query81	505	272	235	235
query82	438	129	99	99
query83	264	255	240	240
query84	258	115	103	103
query85	898	496	464	464
query86	329	263	283	263
query87	2998	3115	2915	2915
query88	3269	2310	2299	2299
query89	461	422	396	396
query90	1996	163	160	160
query91	190	180	141	141
query92	65	69	68	68
query93	1184	924	564	564
query94	531	298	277	277
query95	579	374	311	311
query96	599	478	216	216
query97	2292	2323	2205	2205
query98	210	223	200	200
query99	1257	1333	1199	1199
Total cold run time: 260991 ms
Total hot run time: 178006 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.04
query2	0.10	0.05	0.04
query3	0.26	0.08	0.08
query4	1.61	0.11	0.11
query5	0.28	0.25	0.27
query6	1.18	0.65	0.63
query7	0.04	0.03	0.03
query8	0.06	0.04	0.05
query9	0.57	0.50	0.49
query10	0.54	0.56	0.55
query11	0.15	0.12	0.11
query12	0.15	0.12	0.11
query13	0.63	0.61	0.60
query14	1.01	0.98	0.98
query15	0.82	0.82	0.79
query16	0.40	0.43	0.39
query17	1.01	1.00	1.02
query18	0.23	0.22	0.21
query19	1.87	1.86	1.85
query20	0.02	0.01	0.01
query21	15.43	0.31	0.15
query22	4.87	0.06	0.05
query23	16.22	0.28	0.10
query24	1.32	0.50	0.55
query25	0.10	0.15	0.07
query26	0.14	0.13	0.13
query27	0.05	0.08	0.05
query28	4.78	1.23	1.03
query29	12.61	3.92	3.18
query30	0.28	0.13	0.12
query31	2.82	0.64	0.38
query32	3.23	0.55	0.47
query33	3.03	2.93	3.03
query34	16.89	5.21	4.57
query35	4.62	4.61	4.58
query36	0.67	0.50	0.49
query37	0.11	0.07	0.07
query38	0.07	0.04	0.04
query39	0.04	0.03	0.03
query40	0.17	0.15	0.13
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 98.61 s
Total hot run time: 27.47 s

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 81.68% (740/906) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.51% (18934/35382)
Line Coverage 39.40% (175788/446169)
Region Coverage 33.92% (135923/400726)
Branch Coverage 34.83% (58599/168233)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 81.23% (225/277) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 72.29% (25005/34588)
Line Coverage 59.05% (262712/444912)
Region Coverage 53.80% (217857/404936)
Branch Coverage 55.39% (93517/168841)

@zzzxl1993
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17605	4182	4049	4049
q2	2024	348	235	235
q3	10155	1338	745	745
q4	10220	901	314	314
q5	7795	2157	1951	1951
q6	231	173	136	136
q7	1020	856	712	712
q8	9360	1461	1195	1195
q9	7144	5296	5395	5296
q10	6870	2386	1966	1966
q11	520	317	298	298
q12	699	741	607	607
q13	17803	3716	3018	3018
q14	300	299	279	279
q15	600	526	518	518
q16	727	679	642	642
q17	700	767	589	589
q18	7638	7215	7080	7080
q19	1155	955	622	622
q20	398	367	247	247
q21	4262	3945	3670	3670
q22	1021	1001	948	948
Total cold run time: 108247 ms
Total hot run time: 35117 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4115	4045	4064	4045
q2	326	400	320	320
q3	2178	2683	2290	2290
q4	1328	1752	1308	1308
q5	4237	4759	4653	4653
q6	229	182	137	137
q7	2059	1931	1868	1868
q8	2772	2591	2516	2516
q9	7548	7608	7574	7574
q10	3054	3261	2862	2862
q11	585	535	502	502
q12	706	915	651	651
q13	3594	4073	3368	3368
q14	313	321	283	283
q15	569	508	517	508
q16	671	709	645	645
q17	1184	1480	1431	1431
q18	7864	7989	7551	7551
q19	890	874	908	874
q20	1939	2016	1817	1817
q21	4667	4407	4256	4256
q22	1049	1040	1044	1040
Total cold run time: 51877 ms
Total hot run time: 50499 ms

@doris-robot
Copy link

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

query5	4824	594	452	452
query6	323	232	210	210
query7	4219	453	288	288
query8	293	243	231	231
query9	8783	2494	2525	2494
query10	536	375	332	332
query11	15410	15173	14688	14688
query12	174	118	117	117
query13	1251	480	394	394
query14	6121	2955	2712	2712
query14_1	2644	2638	2643	2638
query15	222	210	181	181
query16	908	472	457	457
query17	1128	715	587	587
query18	2462	450	351	351
query19	230	244	206	206
query20	126	118	110	110
query21	218	141	117	117
query22	3822	3933	3874	3874
query23	16588	16325	15856	15856
query23_1	16143	15938	16019	15938
query24	7323	1618	1223	1223
query24_1	1206	1225	1226	1225
query25	538	510	426	426
query26	1250	267	166	166
query27	2752	461	310	310
query28	4471	2136	2127	2127
query29	789	533	440	440
query30	313	249	218	218
query31	853	704	637	637
query32	79	70	79	70
query33	540	343	280	280
query34	904	914	535	535
query35	767	825	729	729
query36	864	908	808	808
query37	134	100	78	78
query38	2849	2835	2836	2835
query39	756	742	706	706
query39_1	695	696	691	691
query40	227	138	120	120
query41	68	63	62	62
query42	106	102	111	102
query43	427	437	397	397
query44	1342	742	747	742
query45	192	190	187	187
query46	879	977	612	612
query47	1664	1740	1636	1636
query48	327	326	248	248
query49	643	433	352	352
query50	658	301	221	221
query51	3869	3817	3829	3817
query52	113	119	101	101
query53	323	341	291	291
query54	296	254	248	248
query55	82	73	74	73
query56	282	293	288	288
query57	1142	1132	1073	1073
query58	265	252	251	251
query59	2443	2541	2458	2458
query60	311	308	291	291
query61	165	164	162	162
query62	697	661	631	631
query63	330	292	302	292
query64	4987	1296	1051	1051
query65	4027	3964	3940	3940
query66	1455	429	315	315
query67	14984	14843	14693	14693
query68	2747	1028	772	772
query69	440	356	316	316
query70	1041	993	974	974
query71	333	297	274	274
query72	6178	5016	5298	5016
query73	546	640	310	310
query74	8674	8836	8635	8635
query75	3133	3211	2817	2817
query76	2945	1127	723	723
query77	535	398	295	295
query78	9386	9674	8805	8805
query79	1005	931	618	618
query80	881	695	608	608
query81	509	271	236	236
query82	221	136	109	109
query83	362	260	249	249
query84	264	131	113	113
query85	1063	496	454	454
query86	326	293	273	273
query87	3047	3092	2985	2985
query88	3178	2303	2268	2268
query89	466	421	400	400
query90	1877	159	153	153
query91	177	169	146	146
query92	69	71	60	60
query93	969	903	558	558
query94	378	301	286	286
query95	567	322	299	299
query96	588	448	215	215
query97	2259	2311	2235	2235
query98	205	203	194	194
query99	1268	1311	1173	1173
Total cold run time: 251300 ms
Total hot run time: 177988 ms

@doris-robot
Copy link

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

query1	0.05	0.05	0.05
query2	0.09	0.05	0.05
query3	0.26	0.09	0.08
query4	1.61	0.12	0.12
query5	0.26	0.26	0.25
query6	1.21	0.63	0.63
query7	0.03	0.02	0.02
query8	0.06	0.05	0.04
query9	0.59	0.51	0.51
query10	0.58	0.53	0.56
query11	0.16	0.11	0.11
query12	0.15	0.11	0.11
query13	0.61	0.59	0.62
query14	0.98	0.99	0.98
query15	0.84	0.79	0.81
query16	0.40	0.41	0.42
query17	1.01	1.01	1.07
query18	0.23	0.21	0.22
query19	1.86	1.85	1.82
query20	0.02	0.02	0.01
query21	15.44	0.31	0.14
query22	4.73	0.05	0.04
query23	15.96	0.28	0.11
query24	0.93	0.55	0.59
query25	0.09	0.06	0.10
query26	0.15	0.13	0.12
query27	0.09	0.06	0.06
query28	5.32	1.22	1.02
query29	12.62	4.03	3.22
query30	0.28	0.14	0.13
query31	2.82	0.65	0.39
query32	3.23	0.55	0.45
query33	3.03	3.04	3.11
query34	16.95	5.11	4.53
query35	4.54	4.61	4.56
query36	0.65	0.49	0.51
query37	0.11	0.07	0.06
query38	0.07	0.04	0.04
query39	0.05	0.03	0.03
query40	0.16	0.14	0.13
query41	0.08	0.04	0.03
query42	0.04	0.03	0.02
query43	0.04	0.03	0.03
Total cold run time: 98.38 s
Total hot run time: 27.57 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 81.68% (740/906) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.46% (18918/35388)
Line Coverage 39.31% (175341/446093)
Region Coverage 33.81% (135499/400739)
Branch Coverage 34.76% (58466/168205)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 81.59% (226/277) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 72.23% (24986/34590)
Line Coverage 58.99% (262353/444757)
Region Coverage 53.82% (217888/404883)
Branch Coverage 55.37% (93437/168763)

@zzzxl1993 zzzxl1993 requested a review from zclllyybb December 19, 2025 07:23
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Dec 19, 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.

Copy link
Member

@airborne12 airborne12 left a comment

Choose a reason for hiding this comment

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

LGTM

@airborne12 airborne12 merged commit b4e78ba into apache:master Dec 19, 2025
29 of 31 checks passed
airborne12 pushed a commit to airborne12/apache-doris that referenced this pull request Jan 7, 2026
airborne12 added a commit that referenced this pull request Jan 12, 2026
)

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #58545

Problem Summary:

This PR introduces two new features for the SEARCH function:

#### 1. Lucene Boolean Mode

Adds a `mode` option to enable Lucene/Elasticsearch-style query parsing:

```sql
-- Enable Lucene mode via JSON options
SELECT * FROM docs WHERE search('apple AND banana',
  '{"default_field":"title","mode":"lucene"}');

-- With minimum_should_match
SELECT * FROM docs WHERE search('apple AND banana OR cherry',
  '{"default_field":"title","mode":"lucene","minimum_should_match":1}');
```

**Key differences from standard mode:**
- AND/OR/NOT work as left-to-right modifiers (not traditional boolean
algebra)
- Uses MUST/SHOULD/MUST_NOT internally (like Lucene's Occur enum)
- Pure NOT queries return empty results (need positive clause)

**Behavior comparison:**

| Query | Standard Mode | Lucene Mode |
|-------|--------------|-------------|
| `a AND b` | a ∩ b | +a +b (both MUST) |
| `a OR b` | a ∪ b | a b (both SHOULD, min=1) |
| `NOT a` | ¬a | Empty (no positive clause) |
| `a AND NOT b` | a ∩ ¬b | +a -b (MUST a, MUST_NOT b) |
| `a AND b OR c` | (a ∩ b) ∪ c | +a b c (only a is MUST) |

#### 2. Escape Characters in DSL

Support for escaping special characters using backslash:

| Escape | Description | Example |
|--------|-------------|---------|
| `\ ` | Literal space | `title:First\ Value` matches "First Value" |
| `\(` `\)` | Literal parentheses | `title:hello\(world\)` matches
"hello(world)" |
| `\:` | Literal colon | `title:key\:value` matches "key:value" |
| `\\` | Literal backslash | `title:path\\to\\file` matches
"path\to\file" |
github-actions bot pushed a commit that referenced this pull request Jan 12, 2026
)

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #58545

Problem Summary:

This PR introduces two new features for the SEARCH function:

#### 1. Lucene Boolean Mode

Adds a `mode` option to enable Lucene/Elasticsearch-style query parsing:

```sql
-- Enable Lucene mode via JSON options
SELECT * FROM docs WHERE search('apple AND banana',
  '{"default_field":"title","mode":"lucene"}');

-- With minimum_should_match
SELECT * FROM docs WHERE search('apple AND banana OR cherry',
  '{"default_field":"title","mode":"lucene","minimum_should_match":1}');
```

**Key differences from standard mode:**
- AND/OR/NOT work as left-to-right modifiers (not traditional boolean
algebra)
- Uses MUST/SHOULD/MUST_NOT internally (like Lucene's Occur enum)
- Pure NOT queries return empty results (need positive clause)

**Behavior comparison:**

| Query | Standard Mode | Lucene Mode |
|-------|--------------|-------------|
| `a AND b` | a ∩ b | +a +b (both MUST) |
| `a OR b` | a ∪ b | a b (both SHOULD, min=1) |
| `NOT a` | ¬a | Empty (no positive clause) |
| `a AND NOT b` | a ∩ ¬b | +a -b (MUST a, MUST_NOT b) |
| `a AND b OR c` | (a ∩ b) ∪ c | +a b c (only a is MUST) |

#### 2. Escape Characters in DSL

Support for escaping special characters using backslash:

| Escape | Description | Example |
|--------|-------------|---------|
| `\ ` | Literal space | `title:First\ Value` matches "First Value" |
| `\(` `\)` | Literal parentheses | `title:hello\(world\)` matches
"hello(world)" |
| `\:` | Literal colon | `title:key\:value` matches "key:value" |
| `\\` | Literal backslash | `title:path\\to\\file` matches
"path\to\file" |
airborne12 added a commit that referenced this pull request Jan 12, 2026
…feature

This commit adds the necessary dependency files from PR #58545 to fix
compilation errors in the cherry-picked PR #59394 (lucene bool mode for
search function).

Changes include:
- Updated clucene submodule to include skipToBlock/nextDeltaPosition methods
- Added OccurBooleanQuery and related classes (occur.h, occur_boolean_query.h,
  occur_boolean_weight.h/cpp, boolean_query_builder.h)
- Moved operator.h to boolean_query/ directory and fixed include paths
- Updated function_search.h/cpp to use correct include paths
- Various query_v2 file updates for compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
airborne12 added a commit that referenced this pull request Jan 12, 2026
…uery to branch-4.0

Cherry-pick the full implementation and unit tests from PR #58545 to branch-4.0.
Most source code was already added in previous commits as dependencies for PR #59394.

This commit completes the cherry-pick by adding:

Source file fixes:
- regexp_weight.cpp: Fixed to use make_segment_postings() helper

Unit test files (new):
- boolean_query/boolean_query_builder_test.cpp: Tests for query builders
- buffered_union_test.cpp: Tests for BufferedUnion scorer
- disjunction_scorer_test.cpp: Tests for DisjunctionScorer
- exclude_scorer_test.cpp: Tests for ExcludeScorer
- occur_boolean_query_test.cpp: Tests for OccurBooleanQuery
- reqopt_scorer_test.cpp: Tests for ReqOptScorer

Unit test files (updated to PR version):
- boolean_query_test.cpp: Updated to use OperatorBooleanQueryBuilder
- intersection_test.cpp: Updated API calls
- segment_postings_test.cpp: Updated to PR version

All tests compile and pass verification.

Related PR: #58545

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
airborne12 added a commit that referenced this pull request Jan 12, 2026
Cherry-pick PR #58545 to branch-4.0.

This PR implements ES-like boolean query for inverted index, including:

Source files:
- OccurBooleanQuery and related classes for ES-style MUST/SHOULD/MUST_NOT
- OperatorBooleanQuery refactored to separate file
- DisjunctionScorer, ExcludeScorer, ReqOptScorer implementations
- BufferedUnion for efficient union operations
- Updated intersection and segment_postings APIs

Unit tests:
- boolean_query_builder_test.cpp
- buffered_union_test.cpp
- disjunction_scorer_test.cpp
- exclude_scorer_test.cpp
- occur_boolean_query_test.cpp
- reqopt_scorer_test.cpp
- Updated existing test files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
yiguolei pushed a commit that referenced this pull request Jan 13, 2026
…58545 (#59766)

## Summary

Cherry-pick PR #58545 to branch-4.0.

This PR implements ES-like boolean query for inverted index, including:

**Source files:**
- OccurBooleanQuery and related classes for ES-style
MUST/SHOULD/MUST_NOT
- OperatorBooleanQuery refactored to separate file
- DisjunctionScorer, ExcludeScorer, ReqOptScorer implementations
- BufferedUnion for efficient union operations
- Updated intersection and segment_postings APIs

**Unit tests:**
- boolean_query_builder_test.cpp
- buffered_union_test.cpp
- disjunction_scorer_test.cpp
- exclude_scorer_test.cpp
- occur_boolean_query_test.cpp
- reqopt_scorer_test.cpp
- Updated existing test files

## Test plan

- [x] BE unit tests compile successfully
- [x] Unit tests pass verification

Related PR: #58545

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
yiguolei pushed a commit that referenced this pull request Jan 13, 2026
)

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #58545

Problem Summary:

This PR introduces two new features for the SEARCH function:

#### 1. Lucene Boolean Mode

Adds a `mode` option to enable Lucene/Elasticsearch-style query parsing:

```sql
-- Enable Lucene mode via JSON options
SELECT * FROM docs WHERE search('apple AND banana',
  '{"default_field":"title","mode":"lucene"}');

-- With minimum_should_match
SELECT * FROM docs WHERE search('apple AND banana OR cherry',
  '{"default_field":"title","mode":"lucene","minimum_should_match":1}');
```

**Key differences from standard mode:**
- AND/OR/NOT work as left-to-right modifiers (not traditional boolean
algebra)
- Uses MUST/SHOULD/MUST_NOT internally (like Lucene's Occur enum)
- Pure NOT queries return empty results (need positive clause)

**Behavior comparison:**

| Query | Standard Mode | Lucene Mode |
|-------|--------------|-------------|
| `a AND b` | a ∩ b | +a +b (both MUST) |
| `a OR b` | a ∪ b | a b (both SHOULD, min=1) |
| `NOT a` | ¬a | Empty (no positive clause) |
| `a AND NOT b` | a ∩ ¬b | +a -b (MUST a, MUST_NOT b) |
| `a AND b OR c` | (a ∩ b) ∪ c | +a b c (only a is MUST) |

#### 2. Escape Characters in DSL

Support for escaping special characters using backslash:

| Escape | Description | Example |
|--------|-------------|---------|
| `\ ` | Literal space | `title:First\ Value` matches "First Value" |
| `\(` `\)` | Literal parentheses | `title:hello\(world\)` matches
"hello(world)" |
| `\:` | Literal colon | `title:key\:value` matches "key:value" |
| `\\` | Literal backslash | `title:path\\to\\file` matches
"path\to\file" |
zzzxl1993 pushed a commit to zzzxl1993/doris that referenced this pull request Jan 13, 2026
…che#59394)

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: apache#58545

Problem Summary:

This PR introduces two new features for the SEARCH function:

#### 1. Lucene Boolean Mode

Adds a `mode` option to enable Lucene/Elasticsearch-style query parsing:

```sql
-- Enable Lucene mode via JSON options
SELECT * FROM docs WHERE search('apple AND banana',
  '{"default_field":"title","mode":"lucene"}');

-- With minimum_should_match
SELECT * FROM docs WHERE search('apple AND banana OR cherry',
  '{"default_field":"title","mode":"lucene","minimum_should_match":1}');
```

**Key differences from standard mode:**
- AND/OR/NOT work as left-to-right modifiers (not traditional boolean
algebra)
- Uses MUST/SHOULD/MUST_NOT internally (like Lucene's Occur enum)
- Pure NOT queries return empty results (need positive clause)

**Behavior comparison:**

| Query | Standard Mode | Lucene Mode |
|-------|--------------|-------------|
| `a AND b` | a ∩ b | +a +b (both MUST) |
| `a OR b` | a ∪ b | a b (both SHOULD, min=1) |
| `NOT a` | ¬a | Empty (no positive clause) |
| `a AND NOT b` | a ∩ ¬b | +a -b (MUST a, MUST_NOT b) |
| `a AND b OR c` | (a ∩ b) ∪ c | +a b c (only a is MUST) |

#### 2. Escape Characters in DSL

Support for escaping special characters using backslash:

| Escape | Description | Example |
|--------|-------------|---------|
| `\ ` | Literal space | `title:First\ Value` matches "First Value" |
| `\(` `\)` | Literal parentheses | `title:hello\(world\)` matches
"hello(world)" |
| `\:` | Literal colon | `title:key\:value` matches "key:value" |
| `\\` | Literal backslash | `title:path\\to\\file` matches
"path\to\file" |
yiguolei pushed a commit that referenced this pull request Jan 14, 2026
…unction #59394 (#59745)

Cherry-picked from #59394

**Note:** This PR depends on #59766 (cherry-pick of #58545) being merged
first.

## Summary

Introduce lucene bool mode for search function.

## Test plan

- [ ] Regression tests (after dependency PR merged)

Related PRs: #59394
Depends on: #59766

Co-authored-by: Jack <jiangkai@selectdb.com>
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.3-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants