Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor](opt) remove redundant use_default_implementation_for_nulls() of some BE codes #46796

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

superdiaodiao
Copy link
Contributor

@superdiaodiao superdiaodiao commented Jan 10, 2025

What problem does this PR solve?

Problem Summary:

The function use_default_implementation_for_nulls() has been true in their parent class IFunction{}, so we can safely remove this part in some BE codes if its value was set to true.

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?

@superdiaodiao
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 39.36% (10255/26053)
Line Coverage: 30.52% (87411/286399)
Region Coverage: 29.57% (44551/150672)
Branch Coverage: 26.12% (22806/87322)
Coverage Report: http://coverage.selectdb-in.cc/coverage/faa72fd944429a24c5b68e67e37a0f605422985b_faa72fd944429a24c5b68e67e37a0f605422985b/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17571	6092	6037	6037
q2	2049	292	163	163
q3	10437	1252	710	710
q4	10247	882	444	444
q5	8097	2171	1956	1956
q6	208	181	146	146
q7	892	750	590	590
q8	9262	1368	1124	1124
q9	5145	5074	4960	4960
q10	6817	2288	1870	1870
q11	479	272	253	253
q12	332	366	218	218
q13	17781	3683	3095	3095
q14	228	240	213	213
q15	585	507	495	495
q16	615	612	568	568
q17	568	853	323	323
q18	6771	6528	6416	6416
q19	1802	955	569	569
q20	304	320	189	189
q21	2833	2179	1978	1978
q22	366	335	294	294
Total cold run time: 103389 ms
Total hot run time: 32611 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6260	6222	6177	6177
q2	247	330	230	230
q3	2265	2630	2294	2294
q4	1454	1825	1397	1397
q5	4342	4743	4759	4743
q6	189	175	137	137
q7	2024	1968	1793	1793
q8	2606	2860	2705	2705
q9	7223	7318	7209	7209
q10	3020	3328	2716	2716
q11	570	522	502	502
q12	677	764	657	657
q13	3436	3873	3288	3288
q14	277	294	279	279
q15	575	529	512	512
q16	654	708	639	639
q17	1210	1741	1240	1240
q18	7751	7672	7287	7287
q19	813	1104	1104	1104
q20	2028	2050	1947	1947
q21	5635	5114	5033	5033
q22	631	603	577	577
Total cold run time: 53887 ms
Total hot run time: 52466 ms

@doris-robot
Copy link

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

query1	1317	973	927	927
query2	6295	2326	2252	2252
query3	11078	4846	4730	4730
query4	33435	23534	23231	23231
query5	3938	603	471	471
query6	309	199	194	194
query7	3979	493	304	304
query8	326	241	239	239
query9	9383	2646	2659	2646
query10	468	317	255	255
query11	17999	15075	15004	15004
query12	158	107	100	100
query13	1581	524	385	385
query14	9802	7136	6898	6898
query15	247	204	190	190
query16	7925	641	465	465
query17	1531	738	570	570
query18	1978	407	324	324
query19	195	180	155	155
query20	120	112	113	112
query21	216	122	103	103
query22	4667	4684	4323	4323
query23	33935	33288	33275	33275
query24	6515	2278	2316	2278
query25	485	490	389	389
query26	727	282	155	155
query27	2010	472	323	323
query28	5405	2440	2448	2440
query29	614	548	424	424
query30	219	187	165	165
query31	947	881	806	806
query32	73	56	63	56
query33	476	354	300	300
query34	755	861	501	501
query35	775	823	733	733
query36	1006	1010	963	963
query37	125	116	74	74
query38	4302	4198	4143	4143
query39	1505	1481	1435	1435
query40	208	118	102	102
query41	54	51	53	51
query42	125	103	102	102
query43	512	518	498	498
query44	1298	827	818	818
query45	194	174	158	158
query46	867	1040	652	652
query47	1908	1910	1864	1864
query48	376	426	337	337
query49	697	526	389	389
query50	655	664	402	402
query51	7113	7054	6933	6933
query52	101	101	98	98
query53	226	249	185	185
query54	510	491	444	444
query55	85	81	78	78
query56	262	280	278	278
query57	1231	1218	1122	1122
query58	244	236	232	232
query59	3327	3222	3258	3222
query60	275	268	277	268
query61	119	109	112	109
query62	867	796	734	734
query63	223	190	193	190
query64	3293	1021	668	668
query65	3253	3200	3204	3200
query66	771	418	314	314
query67	16343	15862	15594	15594
query68	8556	687	513	513
query69	481	292	252	252
query70	1186	1104	999	999
query71	433	276	256	256
query72	6473	2734	3868	2734
query73	652	747	360	360
query74	9879	9180	8678	8678
query75	4094	3121	2624	2624
query76	3587	1158	748	748
query77	766	361	274	274
query78	9950	10020	9300	9300
query79	2756	788	599	599
query80	650	552	421	421
query81	485	278	231	231
query82	426	152	119	119
query83	172	167	147	147
query84	230	93	74	74
query85	771	337	301	301
query86	388	298	298	298
query87	4416	4385	4215	4215
query88	4782	2141	2129	2129
query89	400	331	292	292
query90	1789	187	182	182
query91	132	134	105	105
query92	77	57	48	48
query93	2185	874	537	537
query94	601	386	282	282
query95	337	255	249	249
query96	488	608	272	272
query97	2902	2931	2835	2835
query98	223	203	195	195
query99	1421	1532	1368	1368
Total cold run time: 293646 ms
Total hot run time: 193017 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.07	0.03	0.03
query3	0.25	0.07	0.07
query4	1.61	0.10	0.10
query5	0.43	0.43	0.39
query6	1.17	0.65	0.64
query7	0.02	0.02	0.01
query8	0.04	0.04	0.03
query9	0.58	0.49	0.49
query10	0.55	0.57	0.56
query11	0.14	0.11	0.11
query12	0.14	0.11	0.10
query13	0.60	0.60	0.59
query14	2.84	2.75	2.74
query15	0.91	0.83	0.82
query16	0.37	0.40	0.40
query17	0.98	1.07	1.07
query18	0.24	0.21	0.21
query19	1.97	1.86	1.99
query20	0.01	0.01	0.02
query21	15.35	0.93	0.58
query22	0.77	0.72	0.61
query23	15.37	1.41	0.57
query24	3.17	1.26	1.49
query25	0.16	0.17	0.13
query26	0.17	0.15	0.14
query27	0.06	0.06	0.04
query28	14.18	1.51	1.06
query29	12.70	3.97	3.31
query30	0.25	0.09	0.07
query31	2.82	0.62	0.39
query32	3.23	0.56	0.45
query33	3.25	3.13	3.07
query34	16.86	5.13	4.52
query35	4.60	4.50	4.50
query36	0.63	0.49	0.49
query37	0.09	0.07	0.06
query38	0.04	0.04	0.03
query39	0.03	0.03	0.02
query40	0.19	0.14	0.12
query41	0.08	0.02	0.02
query42	0.04	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 107.04 s
Total hot run time: 31.75 s

@superdiaodiao superdiaodiao force-pushed the remove_useless_function_codes branch from faa72fd to 2ca36d4 Compare January 11, 2025 08:44
@superdiaodiao
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17604	6133	6111	6111
q2	2051	299	169	169
q3	10522	1217	728	728
q4	10192	863	431	431
q5	7878	2176	1938	1938
q6	208	180	148	148
q7	885	735	605	605
q8	9245	1357	1176	1176
q9	5164	4887	4882	4882
q10	6767	2272	1859	1859
q11	491	264	260	260
q12	339	366	225	225
q13	17810	3668	3264	3264
q14	232	238	212	212
q15	570	508	508	508
q16	619	626	587	587
q17	593	855	321	321
q18	7105	6488	6381	6381
q19	1651	944	533	533
q20	301	320	187	187
q21	2759	2120	1939	1939
q22	359	329	303	303
Total cold run time: 103345 ms
Total hot run time: 32767 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6262	6295	6252	6252
q2	243	324	234	234
q3	2253	2644	2310	2310
q4	1440	1843	1348	1348
q5	4276	4712	4738	4712
q6	187	181	142	142
q7	2047	1981	1794	1794
q8	2602	2881	2721	2721
q9	7225	7218	7279	7218
q10	3043	3324	2707	2707
q11	579	537	495	495
q12	664	768	595	595
q13	3540	3882	3135	3135
q14	303	302	272	272
q15	557	515	499	499
q16	644	705	651	651
q17	1227	1712	1266	1266
q18	7629	7452	7328	7328
q19	796	1137	1066	1066
q20	1969	2072	1892	1892
q21	5738	5161	4897	4897
q22	617	623	590	590
Total cold run time: 53841 ms
Total hot run time: 52124 ms

@doris-robot
Copy link

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

query1	1332	981	958	958
query2	6133	2251	2255	2251
query3	11098	4737	4939	4737
query4	33048	23356	23248	23248
query5	4795	609	449	449
query6	297	214	176	176
query7	3978	477	307	307
query8	280	247	225	225
query9	9462	2668	2652	2652
query10	484	310	247	247
query11	17763	15080	15026	15026
query12	162	107	102	102
query13	1538	498	381	381
query14	10267	7636	7331	7331
query15	216	194	183	183
query16	7203	670	478	478
query17	1495	779	601	601
query18	1310	380	322	322
query19	212	184	164	164
query20	127	120	110	110
query21	205	131	108	108
query22	4669	4589	4529	4529
query23	34178	33386	33138	33138
query24	6558	2351	2306	2306
query25	448	458	403	403
query26	920	275	154	154
query27	2337	463	331	331
query28	5333	2460	2468	2460
query29	536	595	497	497
query30	214	191	157	157
query31	927	885	816	816
query32	73	58	57	57
query33	506	372	305	305
query34	738	846	520	520
query35	820	821	736	736
query36	994	1047	949	949
query37	121	97	74	74
query38	4174	4117	4006	4006
query39	1548	1477	1431	1431
query40	208	122	111	111
query41	60	54	59	54
query42	129	102	101	101
query43	513	544	519	519
query44	1379	806	820	806
query45	222	185	174	174
query46	865	1063	651	651
query47	1912	1946	1886	1886
query48	380	391	310	310
query49	725	476	393	393
query50	672	661	388	388
query51	6986	7003	6999	6999
query52	100	98	91	91
query53	223	248	180	180
query54	520	489	412	412
query55	80	88	79	79
query56	265	250	235	235
query57	1208	1203	1146	1146
query58	270	230	226	226
query59	3151	3250	3183	3183
query60	290	273	257	257
query61	115	117	121	117
query62	862	781	740	740
query63	237	187	186	186
query64	3113	1036	739	739
query65	3335	3222	3201	3201
query66	796	419	307	307
query67	16267	15582	15415	15415
query68	7180	693	553	553
query69	487	293	239	239
query70	1145	1144	1160	1144
query71	417	277	252	252
query72	6529	3864	3895	3864
query73	637	736	351	351
query74	10412	8895	8636	8636
query75	4049	3107	2673	2673
query76	3506	1179	751	751
query77	789	350	274	274
query78	10063	9888	9309	9309
query79	3296	800	593	593
query80	576	545	440	440
query81	509	273	234	234
query82	680	155	121	121
query83	182	240	148	148
query84	242	84	73	73
query85	785	350	295	295
query86	396	317	308	308
query87	4298	4367	4174	4174
query88	5155	2126	2197	2126
query89	405	330	285	285
query90	1827	184	184	184
query91	133	136	113	113
query92	72	54	51	51
query93	2040	874	526	526
query94	634	384	285	285
query95	335	262	317	262
query96	481	610	272	272
query97	2899	2931	2828	2828
query98	212	195	191	191
query99	1413	1527	1341	1341
Total cold run time: 293166 ms
Total hot run time: 194727 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 39.35% (10252/26053)
Line Coverage: 30.52% (87414/286399)
Region Coverage: 29.56% (44537/150672)
Branch Coverage: 26.11% (22796/87322)
Coverage Report: http://coverage.selectdb-in.cc/coverage/2ca36d45b368b6beef360765a31904231a64b25e_2ca36d45b368b6beef360765a31904231a64b25e/report/index.html

@doris-robot
Copy link

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

query1	0.04	0.05	0.04
query2	0.07	0.04	0.03
query3	0.24	0.07	0.07
query4	1.64	0.10	0.10
query5	0.41	0.43	0.43
query6	1.13	0.65	0.66
query7	0.02	0.02	0.02
query8	0.05	0.03	0.03
query9	0.58	0.50	0.52
query10	0.55	0.55	0.54
query11	0.15	0.10	0.10
query12	0.14	0.10	0.11
query13	0.61	0.59	0.60
query14	2.85	2.80	2.73
query15	0.88	0.81	0.81
query16	0.38	0.39	0.37
query17	1.06	1.05	1.01
query18	0.23	0.21	0.20
query19	1.96	1.73	1.97
query20	0.01	0.02	0.01
query21	15.36	0.93	0.58
query22	0.74	0.78	0.78
query23	15.24	1.42	0.53
query24	3.44	1.93	1.84
query25	0.19	0.23	0.15
query26	0.20	0.15	0.13
query27	0.07	0.04	0.05
query28	14.87	1.45	1.05
query29	12.60	3.97	3.26
query30	0.25	0.09	0.06
query31	2.84	0.59	0.37
query32	3.23	0.54	0.46
query33	3.12	3.11	3.09
query34	16.72	5.14	4.53
query35	4.55	4.54	4.61
query36	0.84	0.48	0.49
query37	0.10	0.06	0.05
query38	0.04	0.03	0.04
query39	0.03	0.02	0.02
query40	0.18	0.13	0.13
query41	0.08	0.03	0.02
query42	0.04	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 107.76 s
Total hot run time: 32.25 s

Copy link
Contributor

@HappenLee HappenLee 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 Jan 11, 2025
Copy link
Contributor

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

Copy link
Contributor

PR approved by anyone and no changes requested.

@yiguolei yiguolei merged commit 958ad03 into apache:master Jan 11, 2025
26 of 28 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.

5 participants