Skip to content

Conversation

@zhangstar333
Copy link
Contributor

What problem does this PR solve?

Problem Summary:

sometimes the user create udf function with "always_nullable"="false"
but the function will return null in the logical of udf,
so add some check let user could get error msg more clearly.

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 May 20, 2025

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: 34008 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit b2e7ea03a982db774547d69f78e17f29506fe95f, data reload: false

------ Round 1 ----------------------------------
q1	26417	5143	5028	5028
q2	2141	282	194	194
q3	10372	1288	692	692
q4	10236	1007	512	512
q5	7535	2467	2357	2357
q6	184	164	134	134
q7	915	774	607	607
q8	9346	1324	1140	1140
q9	6847	5109	5169	5109
q10	6848	2319	1884	1884
q11	479	298	289	289
q12	348	360	214	214
q13	17777	3633	3112	3112
q14	237	229	225	225
q15	547	483	487	483
q16	422	438	376	376
q17	609	875	367	367
q18	7651	7155	7196	7155
q19	1215	956	564	564
q20	338	350	224	224
q21	3880	3170	2367	2367
q22	1054	992	975	975
Total cold run time: 115398 ms
Total hot run time: 34008 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5167	5088	5065	5065
q2	240	339	235	235
q3	2192	2675	2305	2305
q4	1375	1756	1381	1381
q5	4576	4472	4417	4417
q6	212	168	127	127
q7	1973	1931	1758	1758
q8	2607	2604	2595	2595
q9	7189	7135	7196	7135
q10	3009	3175	2764	2764
q11	578	507	506	506
q12	679	783	600	600
q13	3572	3935	3256	3256
q14	273	309	274	274
q15	520	485	470	470
q16	448	487	448	448
q17	1168	1578	1375	1375
q18	7677	7529	7381	7381
q19	849	873	999	873
q20	1986	2080	1859	1859
q21	4966	4426	4285	4285
q22	1078	1003	977	977
Total cold run time: 52334 ms
Total hot run time: 50086 ms

@doris-robot
Copy link

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

query1	1013	504	546	504
query2	6548	1843	1773	1773
query3	6759	230	219	219
query4	26642	23399	23618	23399
query5	4339	651	467	467
query6	302	200	194	194
query7	4630	509	308	308
query8	305	267	249	249
query9	8668	2632	2633	2632
query10	471	335	274	274
query11	15772	15089	14893	14893
query12	163	110	107	107
query13	1651	520	419	419
query14	9532	6360	6505	6360
query15	211	197	169	169
query16	7264	652	481	481
query17	1191	740	584	584
query18	1978	401	313	313
query19	195	216	170	170
query20	122	120	120	120
query21	215	141	110	110
query22	4182	4176	4176	4176
query23	34150	33073	33049	33049
query24	8511	2442	2450	2442
query25	568	483	419	419
query26	1244	278	158	158
query27	2743	506	339	339
query28	4306	2129	2109	2109
query29	773	552	447	447
query30	284	216	190	190
query31	952	880	755	755
query32	74	64	67	64
query33	569	365	320	320
query34	885	851	534	534
query35	799	802	764	764
query36	957	988	921	921
query37	117	101	78	78
query38	4099	4121	4061	4061
query39	1461	1431	1414	1414
query40	213	125	116	116
query41	58	54	54	54
query42	125	108	110	108
query43	501	492	478	478
query44	1377	836	840	836
query45	180	178	172	172
query46	904	1054	657	657
query47	1754	1779	1697	1697
query48	401	434	317	317
query49	784	550	455	455
query50	662	678	426	426
query51	4132	4285	4108	4108
query52	109	109	99	99
query53	232	270	188	188
query54	596	592	508	508
query55	92	86	89	86
query56	317	305	293	293
query57	1130	1168	1116	1116
query58	271	262	258	258
query59	2723	2683	2565	2565
query60	344	330	303	303
query61	125	127	130	127
query62	790	723	668	668
query63	237	196	197	196
query64	4329	1019	665	665
query65	4345	4270	4291	4270
query66	1175	423	311	311
query67	15965	15549	15466	15466
query68	8050	940	529	529
query69	469	308	281	281
query70	1227	1172	1055	1055
query71	480	338	315	315
query72	5731	4903	4802	4802
query73	715	628	355	355
query74	9140	9152	9112	9112
query75	3866	3248	2700	2700
query76	3713	1220	789	789
query77	792	384	299	299
query78	10125	10097	9351	9351
query79	3324	832	575	575
query80	643	524	458	458
query81	487	271	221	221
query82	473	127	101	101
query83	297	264	232	232
query84	299	100	92	92
query85	783	429	310	310
query86	392	323	287	287
query87	4324	4470	4345	4345
query88	3491	2326	2310	2310
query89	429	346	297	297
query90	1921	214	218	214
query91	144	142	119	119
query92	76	65	63	63
query93	2862	967	586	586
query94	658	422	305	305
query95	380	295	288	288
query96	506	584	288	288
query97	2719	2762	2628	2628
query98	234	213	213	213
query99	1487	1396	1356	1356
Total cold run time: 278753 ms
Total hot run time: 187404 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.12	0.11	0.11
query3	0.26	0.20	0.21
query4	1.60	0.20	0.21
query5	0.44	0.42	0.41
query6	1.18	0.68	0.66
query7	0.03	0.02	0.02
query8	0.04	0.03	0.04
query9	0.59	0.53	0.51
query10	0.58	0.59	0.57
query11	0.15	0.11	0.11
query12	0.15	0.11	0.11
query13	0.62	0.59	0.61
query14	0.80	0.81	0.82
query15	0.89	0.88	0.88
query16	0.38	0.39	0.39
query17	1.06	1.05	1.08
query18	0.22	0.21	0.21
query19	1.92	1.88	1.82
query20	0.02	0.01	0.01
query21	15.41	0.89	0.53
query22	0.76	1.17	0.63
query23	15.00	1.38	0.58
query24	7.48	0.96	0.55
query25	0.53	0.12	0.14
query26	0.68	0.17	0.13
query27	0.06	0.05	0.06
query28	8.72	0.87	0.43
query29	12.56	3.92	3.28
query30	0.25	0.09	0.06
query31	2.82	0.60	0.40
query32	3.24	0.54	0.46
query33	3.06	3.11	3.11
query34	15.73	5.07	4.48
query35	4.48	4.50	4.49
query36	0.66	0.49	0.49
query37	0.09	0.06	0.07
query38	0.05	0.04	0.04
query39	0.03	0.03	0.02
query40	0.17	0.14	0.13
query41	0.07	0.03	0.02
query42	0.03	0.03	0.02
query43	0.04	0.03	0.03
Total cold run time: 103.01 s
Total hot run time: 28.83 s

@zhangstar333
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26154	5081	5011	5011
q2	2080	288	182	182
q3	10662	1219	686	686
q4	10229	1000	546	546
q5	8017	2537	2372	2372
q6	182	169	137	137
q7	963	737	629	629
q8	9330	1299	1107	1107
q9	7005	5173	5162	5162
q10	6862	2329	1915	1915
q11	491	294	294	294
q12	356	350	218	218
q13	18399	3737	3126	3126
q14	226	231	216	216
q15	531	496	495	495
q16	416	433	384	384
q17	594	844	361	361
q18	7500	7206	7161	7161
q19	1981	959	546	546
q20	343	331	217	217
q21	3667	3242	2371	2371
q22	1138	1071	1024	1024
Total cold run time: 117126 ms
Total hot run time: 34160 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5174	5160	5133	5133
q2	237	324	232	232
q3	2288	2869	2516	2516
q4	1391	1926	1473	1473
q5	4673	4477	4430	4430
q6	216	166	129	129
q7	2031	1919	1779	1779
q8	2580	2665	2575	2575
q9	7185	7267	6982	6982
q10	3007	3162	2752	2752
q11	590	509	512	509
q12	686	763	624	624
q13	3541	3881	3418	3418
q14	298	289	267	267
q15	523	469	474	469
q16	442	496	442	442
q17	1133	1522	1374	1374
q18	7713	7581	7516	7516
q19	778	785	836	785
q20	1961	2025	1846	1846
q21	4881	4585	4396	4396
q22	1092	1055	1045	1045
Total cold run time: 52420 ms
Total hot run time: 50692 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 193845 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 1f650755883428f9cc9f765e8ce5e9b0d525724d, data reload: false

query1	1440	1120	1048	1048
query2	6432	1829	1775	1775
query3	11047	4363	4548	4363
query4	53878	25895	23487	23487
query5	5141	516	466	466
query6	360	224	214	214
query7	4963	526	295	295
query8	320	270	239	239
query9	5817	2630	2647	2630
query10	445	331	303	303
query11	15133	15006	14944	14944
query12	159	115	105	105
query13	1063	539	407	407
query14	10255	6361	6368	6361
query15	220	216	192	192
query16	7058	642	523	523
query17	1104	770	619	619
query18	1546	419	342	342
query19	205	204	183	183
query20	137	130	126	126
query21	247	134	105	105
query22	4406	4433	4203	4203
query23	34341	33728	33752	33728
query24	6694	2459	2440	2440
query25	474	486	435	435
query26	728	277	165	165
query27	2393	529	366	366
query28	3016	2147	2183	2147
query29	601	586	456	456
query30	305	226	201	201
query31	882	869	814	814
query32	74	66	61	61
query33	446	380	309	309
query34	792	848	540	540
query35	777	845	771	771
query36	931	1026	922	922
query37	117	106	80	80
query38	4285	4348	4269	4269
query39	1527	1523	1486	1486
query40	223	131	123	123
query41	55	57	52	52
query42	131	111	109	109
query43	500	514	479	479
query44	1327	851	858	851
query45	192	178	171	171
query46	859	1040	669	669
query47	1859	1855	1791	1791
query48	412	460	342	342
query49	702	529	444	444
query50	675	709	429	429
query51	4183	4274	4204	4204
query52	121	109	104	104
query53	225	251	191	191
query54	596	593	523	523
query55	93	91	86	86
query56	346	335	313	313
query57	1191	1204	1182	1182
query58	270	277	262	262
query59	2602	2763	2719	2719
query60	345	339	320	320
query61	126	126	130	126
query62	758	758	665	665
query63	230	199	204	199
query64	1859	1037	709	709
query65	4327	4255	4258	4255
query66	739	442	303	303
query67	15959	15553	15489	15489
query68	7212	885	514	514
query69	552	309	277	277
query70	1208	1189	1178	1178
query71	506	319	295	295
query72	5998	4817	4779	4779
query73	1372	602	354	354
query74	9282	9108	8915	8915
query75	3738	3194	2702	2702
query76	4291	1193	744	744
query77	657	369	292	292
query78	10144	10088	9296	9296
query79	3504	814	575	575
query80	634	540	451	451
query81	480	255	218	218
query82	478	132	99	99
query83	362	308	246	246
query84	309	101	87	87
query85	798	354	314	314
query86	398	313	299	299
query87	4458	4471	4360	4360
query88	3379	2320	2325	2320
query89	451	315	297	297
query90	1916	219	214	214
query91	210	148	111	111
query92	72	61	58	58
query93	2616	934	578	578
query94	657	417	303	303
query95	370	298	289	289
query96	507	585	286	286
query97	2748	2739	2666	2666
query98	228	205	208	205
query99	1423	1386	1293	1293
Total cold run time: 301622 ms
Total hot run time: 193845 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.12	0.11	0.10
query3	0.26	0.19	0.20
query4	1.59	0.19	0.12
query5	0.44	0.43	0.41
query6	1.17	0.64	0.68
query7	0.02	0.02	0.02
query8	0.04	0.03	0.04
query9	0.60	0.51	0.51
query10	0.56	0.58	0.56
query11	0.16	0.12	0.10
query12	0.15	0.12	0.12
query13	0.62	0.61	0.59
query14	0.79	0.82	0.81
query15	0.88	0.87	0.86
query16	0.38	0.40	0.39
query17	1.08	1.05	1.05
query18	0.22	0.21	0.22
query19	1.93	1.88	1.78
query20	0.01	0.01	0.01
query21	15.41	0.90	0.55
query22	0.75	1.24	0.77
query23	14.78	1.38	0.63
query24	7.02	1.29	1.37
query25	0.48	0.21	0.13
query26	0.57	0.16	0.13
query27	0.05	0.05	0.05
query28	10.05	0.91	0.47
query29	12.54	4.01	3.41
query30	0.25	0.09	0.07
query31	2.82	0.59	0.40
query32	3.23	0.56	0.47
query33	3.20	3.13	3.05
query34	15.67	5.11	4.47
query35	4.50	4.51	4.49
query36	0.67	0.50	0.49
query37	0.09	0.06	0.06
query38	0.05	0.05	0.04
query39	0.03	0.02	0.02
query40	0.17	0.14	0.14
query41	0.09	0.03	0.02
query42	0.03	0.02	0.02
query43	0.04	0.04	0.03
Total cold run time: 103.55 s
Total hot run time: 29.73 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
Copy link
Contributor

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

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label May 22, 2025
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@yiguolei yiguolei merged commit c07e893 into apache:master May 22, 2025
25 of 26 checks passed
@yiguolei yiguolei added the usercase Important user case type label label May 23, 2025
zhangstar333 added a commit to zhangstar333/incubator-doris that referenced this pull request May 23, 2025
Problem Summary:

sometimes the user create udf function with  "always_nullable"="false"
but the function will return null in the logical of udf,
so add some check let user could get error msg more clearly.
zhangstar333 added a commit to zhangstar333/incubator-doris that referenced this pull request May 23, 2025
Problem Summary:

sometimes the user create udf function with  "always_nullable"="false"
but the function will return null in the logical of udf,
so add some check let user could get error msg more clearly.
dataroaring pushed a commit that referenced this pull request May 24, 2025
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
### What problem does this PR solve?
Problem Summary:

sometimes the user create udf function with  "always_nullable"="false"
but the function will return null in the logical of udf,
so add some check let user could get error msg more clearly.
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/2.1.11-merged dev/3.0.6-merged reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants