Skip to content

[fix](date) fix allow_zero_date function incorrect result issue#61791

Open
LuGuangming wants to merge 1 commit intoapache:masterfrom
LuGuangming:master_allow_zero_date
Open

[fix](date) fix allow_zero_date function incorrect result issue#61791
LuGuangming wants to merge 1 commit intoapache:masterfrom
LuGuangming:master_allow_zero_date

Conversation

@LuGuangming
Copy link
Contributor

@LuGuangming LuGuangming commented Mar 27, 2026

What problem does this PR solve?

Issue Number: close #61789

Related PR: #xxx

Problem Summary:
when set be.conf allow_zero_date=true, we found it's do not work

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?

@Vallishp
Copy link
Contributor

run buildall

@LuGuangming LuGuangming changed the title [fix] fix allow_zero_date function incorrect result issue [fix](date) fix allow_zero_date function incorrect result issue Mar 27, 2026
@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.87% (19915/37669)
Line Coverage 36.41% (186644/512655)
Region Coverage 32.67% (144756/443133)
Branch Coverage 33.88% (63479/187386)

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17619	4429	4271	4271
q2	q3	10648	792	529	529
q4	4679	381	252	252
q5	7593	1229	1023	1023
q6	183	174	144	144
q7	801	880	677	677
q8	9983	1502	1315	1315
q9	5479	4753	4722	4722
q10	6330	1940	1631	1631
q11	481	241	242	241
q12	764	577	463	463
q13	18044	2680	1965	1965
q14	224	242	211	211
q15	q16	732	732	655	655
q17	747	832	452	452
q18	5940	5452	5211	5211
q19	1159	972	601	601
q20	568	493	369	369
q21	4490	1858	1588	1588
q22	421	363	305	305
Total cold run time: 96885 ms
Total hot run time: 26625 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4785	4545	4695	4545
q2	q3	3874	4390	3885	3885
q4	874	1181	766	766
q5	4046	4384	4347	4347
q6	200	187	145	145
q7	1817	1677	1534	1534
q8	2517	2712	2576	2576
q9	7631	7558	7104	7104
q10	3758	3951	3656	3656
q11	542	447	469	447
q12	505	610	436	436
q13	2482	3080	2192	2192
q14	279	297	296	296
q15	q16	745	762	702	702
q17	1218	1306	1372	1306
q18	7242	6965	6711	6711
q19	887	917	961	917
q20	2100	2168	2027	2027
q21	3947	3508	3310	3310
q22	458	422	376	376
Total cold run time: 49907 ms
Total hot run time: 47278 ms

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.49% (27125/36911)
Line Coverage 57.03% (291605/511358)
Region Coverage 54.35% (243128/447366)
Branch Coverage 56.07% (105440/188051)

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17638	4438	4288	4288
q2	q3	10657	788	540	540
q4	4680	359	246	246
q5	7568	1206	1039	1039
q6	183	176	147	147
q7	783	842	665	665
q8	9293	1470	1333	1333
q9	4860	4761	4734	4734
q10	6259	1903	1680	1680
q11	469	260	249	249
q12	732	596	471	471
q13	18015	2756	1961	1961
q14	239	225	227	225
q15	q16	745	753	658	658
q17	747	828	468	468
q18	6032	5386	5331	5331
q19	1136	992	617	617
q20	536	492	376	376
q21	4417	1835	1397	1397
q22	341	292	445	292
Total cold run time: 95330 ms
Total hot run time: 26717 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4793	4661	4547	4547
q2	q3	3918	4397	3840	3840
q4	876	1205	775	775
q5	4078	4371	4354	4354
q6	179	185	143	143
q7	1744	1649	1529	1529
q8	2483	2732	2581	2581
q9	7606	7434	7442	7434
q10	3818	4006	3572	3572
q11	504	428	415	415
q12	490	571	451	451
q13	2425	2936	2139	2139
q14	301	306	272	272
q15	q16	775	751	702	702
q17	1149	1338	1337	1337
q18	7147	6779	6593	6593
q19	941	1057	938	938
q20	2081	2175	2013	2013
q21	3964	3410	3466	3410
q22	444	424	390	390
Total cold run time: 49716 ms
Total hot run time: 47435 ms

@doris-robot
Copy link

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

query5	4328	642	519	519
query6	333	225	204	204
query7	4207	477	263	263
query8	345	245	229	229
query9	8706	2730	2749	2730
query10	503	368	315	315
query11	7009	5084	4870	4870
query12	185	129	124	124
query13	1285	465	343	343
query14	5807	3725	3452	3452
query14_1	2876	2847	2854	2847
query15	206	195	180	180
query16	996	501	488	488
query17	1125	758	634	634
query18	2455	459	368	368
query19	218	220	190	190
query20	132	128	126	126
query21	218	135	113	113
query22	13330	14833	14755	14755
query23	16660	16126	15704	15704
query23_1	15692	15641	15690	15641
query24	7293	1599	1270	1270
query24_1	1222	1234	1232	1232
query25	542	458	407	407
query26	1247	271	148	148
query27	2758	476	296	296
query28	4461	1861	1823	1823
query29	841	578	485	485
query30	297	226	192	192
query31	1001	948	876	876
query32	84	72	73	72
query33	514	336	291	291
query34	877	874	515	515
query35	636	694	602	602
query36	1065	1109	985	985
query37	144	101	85	85
query38	2895	2923	2856	2856
query39	874	850	825	825
query39_1	802	809	798	798
query40	235	153	134	134
query41	65	59	57	57
query42	263	254	256	254
query43	250	244	221	221
query44	
query45	197	192	175	175
query46	891	1006	613	613
query47	2535	2122	2064	2064
query48	320	320	230	230
query49	652	463	395	395
query50	695	285	225	225
query51	4157	3996	4006	3996
query52	273	266	258	258
query53	290	330	288	288
query54	310	281	281	281
query55	90	93	82	82
query56	331	322	303	303
query57	1960	1803	1823	1803
query58	285	283	276	276
query59	2815	2929	2742	2742
query60	351	347	328	328
query61	163	155	156	155
query62	608	584	537	537
query63	315	274	283	274
query64	5106	1321	1056	1056
query65	
query66	1463	466	366	366
query67	24193	24226	24100	24100
query68	
query69	411	326	294	294
query70	1020	979	946	946
query71	351	311	309	309
query72	2825	2738	2481	2481
query73	555	548	317	317
query74	9633	9569	9377	9377
query75	2880	2762	2468	2468
query76	2307	1041	705	705
query77	374	386	314	314
query78	10917	11171	10462	10462
query79	1132	756	571	571
query80	1348	619	541	541
query81	553	257	224	224
query82	1026	159	119	119
query83	363	265	244	244
query84	251	117	106	106
query85	919	533	472	472
query86	426	334	286	286
query87	3210	3145	3032	3032
query88	3597	2664	2668	2664
query89	437	373	354	354
query90	2048	189	181	181
query91	177	166	138	138
query92	80	83	73	73
query93	1004	853	510	510
query94	669	337	302	302
query95	610	340	332	332
query96	641	533	231	231
query97	2469	2473	2372	2372
query98	239	224	219	219
query99	1038	1003	960	960
Total cold run time: 250648 ms
Total hot run time: 169532 ms

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] allow_zero_date do not work

4 participants