Skip to content

Conversation

@zhangstar333
Copy link
Contributor

@zhangstar333 zhangstar333 commented Feb 12, 2026

What problem does this PR solve?

Problem Summary:
before the UDF use static load will cache some values in UdfClassCache,
but not cache the classload, those will cause some NoClassDefFoundError
when users UDF have invoke some thirdparty class.

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

@Thearas
Copy link
Contributor

Thearas commented Feb 12, 2026

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?

@zhangstar333
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17621	4537	4336	4336
q2	2028	350	234	234
q3	10173	1279	711	711
q4	10190	773	298	298
q5	7483	2159	1939	1939
q6	192	183	146	146
q7	884	749	592	592
q8	9265	1375	1076	1076
q9	4765	4770	4649	4649
q10	6827	1967	1535	1535
q11	466	257	234	234
q12	337	377	226	226
q13	17794	4092	3235	3235
q14	230	236	209	209
q15	889	817	800	800
q16	685	687	622	622
q17	707	848	529	529
q18	6505	5867	6199	5867
q19	1419	1072	644	644
q20	533	531	405	405
q21	2804	1968	1999	1968
q22	349	310	246	246
Total cold run time: 102146 ms
Total hot run time: 30501 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4554	4555	4659	4555
q2	294	356	259	259
q3	2278	2976	2403	2403
q4	1454	1801	1400	1400
q5	4862	4794	4644	4644
q6	224	196	141	141
q7	2003	1943	1799	1799
q8	2636	2449	2363	2363
q9	7364	7332	7418	7332
q10	2770	3163	2664	2664
q11	517	435	412	412
q12	694	794	636	636
q13	3610	3999	3258	3258
q14	266	273	273	273
q15	815	781	779	779
q16	638	680	648	648
q17	1100	1245	1283	1245
q18	7675	7345	7446	7345
q19	853	784	795	784
q20	1979	2100	1862	1862
q21	4495	4212	4109	4109
q22	503	441	437	437
Total cold run time: 51584 ms
Total hot run time: 49348 ms

@doris-robot
Copy link

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

query5	4342	624	496	496
query6	343	218	193	193
query7	4210	461	267	267
query8	336	236	231	231
query9	8728	2724	2684	2684
query10	479	402	337	337
query11	17217	17128	16738	16738
query12	176	122	121	121
query13	1248	430	345	345
query14	5978	3149	2954	2954
query14_1	2811	2770	2746	2746
query15	194	195	171	171
query16	964	474	450	450
query17	1072	669	575	575
query18	2451	440	354	354
query19	207	209	179	179
query20	139	130	130	130
query21	226	150	125	125
query22	4848	5001	4831	4831
query23	17397	16945	16701	16701
query23_1	16870	16804	16761	16761
query24	7174	1604	1226	1226
query24_1	1217	1225	1223	1223
query25	558	460	414	414
query26	1240	269	155	155
query27	2758	467	300	300
query28	4561	1861	1858	1858
query29	805	567	466	466
query30	328	252	224	224
query31	894	764	658	658
query32	90	77	81	77
query33	528	356	295	295
query34	914	931	571	571
query35	643	693	614	614
query36	1116	1139	1040	1040
query37	144	102	87	87
query38	2927	2898	2856	2856
query39	889	848	834	834
query39_1	804	824	799	799
query40	221	141	124	124
query41	75	70	68	68
query42	113	110	107	107
query43	378	385	344	344
query44	1310	729	728	728
query45	209	199	184	184
query46	890	978	609	609
query47	2140	2143	2070	2070
query48	311	320	244	244
query49	617	450	361	361
query50	677	284	218	218
query51	4135	4131	4090	4090
query52	108	118	100	100
query53	303	333	288	288
query54	312	294	276	276
query55	89	93	81	81
query56	329	311	343	311
query57	1396	1367	1261	1261
query58	305	284	282	282
query59	2538	2727	2518	2518
query60	353	358	338	338
query61	175	171	189	171
query62	632	589	550	550
query63	306	283	279	279
query64	4934	1238	929	929
query65	4448	4557	4525	4525
query66	1456	464	359	359
query67	16658	16504	16408	16408
query68	2469	1069	711	711
query69	404	317	281	281
query70	1026	1019	925	925
query71	323	315	317	315
query72	2898	2821	2521	2521
query73	516	549	318	318
query74	9643	9545	9354	9354
query75	2830	2739	2419	2419
query76	2297	1065	676	676
query77	390	399	319	319
query78	10886	11029	10383	10383
query79	2339	924	608	608
query80	1713	567	497	497
query81	568	284	253	253
query82	969	157	115	115
query83	322	266	245	245
query84	259	130	94	94
query85	908	462	413	413
query86	415	321	298	298
query87	3084	3125	2983	2983
query88	3577	2645	2650	2645
query89	427	372	341	341
query90	1948	180	181	180
query91	175	156	133	133
query92	79	73	70	70
query93	1123	851	483	483
query94	636	327	289	289
query95	592	395	322	322
query96	633	502	232	232
query97	2532	2478	2408	2408
query98	226	220	205	205
query99	1017	992	903	903
Total cold run time: 262566 ms
Total hot run time: 188671 ms

@zhangstar333 zhangstar333 changed the title [bug](udf) udf should cache classload in static load [bug](udf) udf should cache classloader in static load Feb 12, 2026
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17666	4555	4323	4323
q2	2053	367	244	244
q3	10121	1353	750	750
q4	10195	791	305	305
q5	7766	2323	1916	1916
q6	208	184	151	151
q7	896	768	624	624
q8	9297	1453	1231	1231
q9	4845	4688	4622	4622
q10	6858	1952	1545	1545
q11	461	247	237	237
q12	407	379	223	223
q13	17786	4076	3227	3227
q14	237	237	226	226
q15	945	823	800	800
q16	664	678	627	627
q17	774	813	533	533
q18	6623	5785	5696	5696
q19	1648	1003	611	611
q20	512	491	392	392
q21	2569	1894	1796	1796
q22	329	286	255	255
Total cold run time: 102860 ms
Total hot run time: 30334 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4469	4374	4365	4365
q2	271	342	266	266
q3	2073	2652	2239	2239
q4	1352	1738	1281	1281
q5	4296	4257	4403	4257
q6	205	177	138	138
q7	1834	1770	1626	1626
q8	2729	2563	2526	2526
q9	7729	7543	7550	7543
q10	2801	3036	2594	2594
q11	529	456	427	427
q12	722	764	640	640
q13	3910	4361	3675	3675
q14	286	461	352	352
q15	866	806	808	806
q16	658	720	669	669
q17	1150	1415	1398	1398
q18	8343	8054	7633	7633
q19	896	861	833	833
q20	2046	2208	2033	2033
q21	4827	4459	4139	4139
q22	491	434	436	434
Total cold run time: 52483 ms
Total hot run time: 49874 ms

@doris-robot
Copy link

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

query5	4308	614	493	493
query6	325	217	205	205
query7	4209	468	282	282
query8	344	232	228	228
query9	8710	2732	2727	2727
query10	517	356	348	348
query11	17141	17082	16758	16758
query12	186	126	126	126
query13	1249	454	355	355
query14	5557	3204	2955	2955
query14_1	2753	2763	2778	2763
query15	205	189	174	174
query16	969	466	465	465
query17	1100	697	595	595
query18	2454	450	342	342
query19	208	205	190	190
query20	135	129	127	127
query21	227	140	127	127
query22	4989	5067	4768	4768
query23	17322	16909	16570	16570
query23_1	16851	16855	16859	16855
query24	7307	1611	1197	1197
query24_1	1227	1253	1237	1237
query25	552	473	414	414
query26	1242	275	163	163
query27	2750	460	294	294
query28	4512	1874	1855	1855
query29	813	567	482	482
query30	319	254	223	223
query31	860	728	664	664
query32	88	77	75	75
query33	542	348	297	297
query34	931	921	561	561
query35	640	715	600	600
query36	1070	1143	979	979
query37	140	101	91	91
query38	2937	2898	2907	2898
query39	876	832	830	830
query39_1	829	812	801	801
query40	229	144	123	123
query41	91	68	69	68
query42	109	106	104	104
query43	383	383	353	353
query44	1302	716	711	711
query45	204	194	184	184
query46	889	994	606	606
query47	2130	2178	2064	2064
query48	314	324	241	241
query49	620	451	364	364
query50	684	285	226	226
query51	4154	4157	4172	4157
query52	108	114	103	103
query53	310	339	284	284
query54	314	286	272	272
query55	87	92	87	87
query56	321	326	326	326
query57	1427	1333	1285	1285
query58	301	281	285	281
query59	2616	2670	2532	2532
query60	349	348	335	335
query61	204	145	145	145
query62	605	585	537	537
query63	309	276	277	276
query64	4933	1237	966	966
query65	4621	4534	4533	4533
query66	1461	466	347	347
query67	16486	16657	16501	16501
query68	2404	1057	703	703
query69	407	309	288	288
query70	1024	950	922	922
query71	328	324	301	301
query72	2888	2851	2546	2546
query73	514	558	321	321
query74	9634	9593	9371	9371
query75	2784	2754	2453	2453
query76	2289	1077	652	652
query77	356	371	308	308
query78	10932	11030	10475	10475
query79	1072	919	602	602
query80	1257	581	487	487
query81	560	281	258	258
query82	988	159	114	114
query83	317	262	235	235
query84	247	117	92	92
query85	918	473	410	410
query86	418	311	287	287
query87	3143	3102	2972	2972
query88	3551	2659	2635	2635
query89	438	379	364	364
query90	1979	183	171	171
query91	179	153	131	131
query92	76	75	70	70
query93	942	861	480	480
query94	648	329	282	282
query95	607	393	321	321
query96	637	515	222	222
query97	2488	2501	2467	2467
query98	230	218	225	218
query99	999	1003	934	934
Total cold run time: 260007 ms
Total hot run time: 189165 ms

@doris-robot
Copy link

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

query1	0.06	0.04	0.04
query2	0.10	0.05	0.04
query3	0.26	0.09	0.08
query4	1.62	0.11	0.11
query5	0.26	0.24	0.26
query6	1.16	0.66	0.67
query7	0.02	0.02	0.02
query8	0.05	0.04	0.05
query9	0.57	0.50	0.49
query10	0.55	0.54	0.54
query11	0.14	0.10	0.10
query12	0.14	0.10	0.10
query13	0.64	0.61	0.63
query14	1.06	1.06	1.07
query15	0.88	0.85	0.87
query16	0.39	0.39	0.39
query17	1.11	1.14	1.13
query18	0.22	0.21	0.21
query19	2.01	2.02	1.95
query20	0.02	0.02	0.01
query21	15.39	0.28	0.15
query22	5.26	0.05	0.04
query23	16.17	0.31	0.10
query24	1.52	0.53	0.46
query25	0.13	0.19	0.06
query26	0.15	0.14	0.13
query27	0.08	0.06	0.06
query28	4.51	1.14	0.97
query29	12.58	3.99	3.20
query30	0.29	0.13	0.11
query31	2.81	0.64	0.41
query32	3.24	0.60	0.52
query33	3.34	3.21	3.28
query34	16.77	5.38	4.75
query35	4.75	4.88	4.79
query36	0.67	0.50	0.49
query37	0.12	0.07	0.07
query38	0.09	0.05	0.04
query39	0.04	0.03	0.04
query40	0.19	0.16	0.15
query41	0.09	0.03	0.02
query42	0.04	0.04	0.03
query43	0.04	0.04	0.03
Total cold run time: 99.53 s
Total hot run time: 28.49 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants