Skip to content

Conversation

@hubgeter
Copy link
Contributor

bp #53050

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

Related PR: apache#40695
Problem Summary:

pr apache#40695 introduced the function `from_iso8601_date`, which parses the
string to get year、mouth、 day, and sets the date value through the
`set_time_unit` function.
Since `set_time_unit` lacks some judgment on mouth, it may get an
illegal date in the end, which may cause core in debug mode.

sql : `select from_iso8601_date('2023-00-01');`
```
F20250709 09:50:14.366984 3587796 vdatetime_value.h:1222] Check failed: date_v2_value_.month_ != 0
*** Check failure stack trace: ***
    @     0x559bd7050d96  google::LogMessage::SendToLog()
    @     0x559bd704d7e0  google::LogMessage::Flush()
    @     0x559bd70515d9  google::LogMessageFatal::~LogMessageFatal()
    @     0x559bc725a570  doris::DateV2Value<>::set_time_unit<>()
    @     0x559bc7257380  doris::vectorized::FromIso8601DateV2::execute()
    @     0x559bc7255a88  doris::vectorized::FunctionOtherTypesToDateType<>::execute_impl()
    @     0x559bc09e0781  doris::vectorized::DefaultExecutable::execute_impl()
    @     0x559bc423aa20  doris::vectorized::PreparedFunctionImpl::_execute_skipped_constant_deal()
    @     0x559bc4234938  doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns()
    @     0x559bc4233f42  doris::vectorized::PreparedFunctionImpl::default_implementation_for_nulls()
    @     0x559bc423a773  doris::vectorized::PreparedFunctionImpl::_execute_skipped_constant_deal()
    @     0x559bc4234938  doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns()
    @     0x559bc4234a57  doris::vectorized::PreparedFunctionImpl::execute()
```
@hubgeter hubgeter requested a review from dataroaring as a code owner July 15, 2025 09:19
@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?

@hubgeter
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17693	7079	7031	7031
q2	4175	185	167	167
q3	11701	1108	1204	1108
q4	10356	788	846	788
q5	7744	2929	2837	2837
q6	214	129	129	129
q7	999	606	593	593
q8	9342	1973	2058	1973
q9	6685	6405	6467	6405
q10	6994	2258	2327	2258
q11	463	262	267	262
q12	414	213	215	213
q13	17787	2964	3032	2964
q14	242	212	214	212
q15	524	476	466	466
q16	488	376	377	376
q17	1002	553	565	553
q18	7379	6634	6715	6634
q19	1411	1016	1171	1016
q20	481	215	200	200
q21	3866	3228	3105	3105
q22	1131	973	987	973
Total cold run time: 111091 ms
Total hot run time: 40263 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6612	6606	6698	6606
q2	348	239	262	239
q3	3189	2913	2980	2913
q4	2056	1905	1764	1764
q5	5687	5718	5723	5718
q6	204	122	120	120
q7	2166	1756	1819	1756
q8	3373	3586	3495	3495
q9	8895	8914	8922	8914
q10	3593	3560	3542	3542
q11	590	506	519	506
q12	806	598	584	584
q13	9228	3184	3127	3127
q14	307	261	286	261
q15	508	471	468	468
q16	493	433	440	433
q17	1809	1598	1615	1598
q18	8345	7736	7773	7736
q19	1701	1523	1480	1480
q20	2072	1880	1872	1872
q21	5103	4898	4900	4898
q22	1073	979	988	979
Total cold run time: 68158 ms
Total hot run time: 59009 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 191098 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 2237e68b84a3f8c2f0b0a059c85526612e7b0152, data reload: false

query1	962	381	381	381
query2	6534	1926	1841	1841
query3	6702	213	216	213
query4	34848	23681	23653	23653
query5	4369	458	432	432
query6	274	170	198	170
query7	4655	313	306	306
query8	277	218	205	205
query9	9563	2573	2566	2566
query10	493	265	251	251
query11	18222	15291	15318	15291
query12	164	105	102	102
query13	1635	436	417	417
query14	9548	7319	7217	7217
query15	263	172	179	172
query16	8120	451	408	408
query17	1631	579	579	579
query18	2137	314	330	314
query19	303	172	158	158
query20	120	110	115	110
query21	211	107	106	106
query22	4420	4148	4210	4148
query23	34370	33689	33637	33637
query24	11278	2879	2869	2869
query25	657	400	390	390
query26	1645	164	165	164
query27	2916	353	341	341
query28	7746	2110	2111	2110
query29	984	445	428	428
query30	313	156	159	156
query31	990	787	805	787
query32	93	66	56	56
query33	793	294	293	293
query34	921	493	502	493
query35	861	709	704	704
query36	1100	951	908	908
query37	125	63	67	63
query38	3983	3858	3867	3858
query39	1469	1459	1456	1456
query40	292	98	98	98
query41	51	48	48	48
query42	107	102	98	98
query43	512	464	457	457
query44	1272	796	796	796
query45	181	172	169	169
query46	1141	727	719	719
query47	1907	1831	1826	1826
query48	486	380	382	380
query49	1288	395	398	395
query50	835	409	423	409
query51	7351	7246	7124	7124
query52	106	91	89	89
query53	260	178	185	178
query54	1207	460	469	460
query55	77	78	78	78
query56	258	250	239	239
query57	1289	1136	1142	1136
query58	234	212	218	212
query59	3045	2850	2897	2850
query60	289	265	258	258
query61	115	106	110	106
query62	853	664	671	664
query63	217	188	189	188
query64	5295	664	621	621
query65	3284	3177	3168	3168
query66	1445	314	313	313
query67	15855	15604	15553	15553
query68	4393	574	561	561
query69	427	271	255	255
query70	1197	1090	1119	1090
query71	329	260	266	260
query72	6389	4069	4056	4056
query73	756	343	350	343
query74	10412	9396	9273	9273
query75	3383	2695	2657	2657
query76	2607	1092	983	983
query77	415	274	272	272
query78	10428	9556	9741	9556
query79	1099	585	588	585
query80	757	448	439	439
query81	494	216	218	216
query82	1278	87	89	87
query83	248	150	148	148
query84	238	85	75	75
query85	1101	293	284	284
query86	318	299	281	281
query87	4349	4249	4228	4228
query88	3462	2375	2350	2350
query89	398	296	291	291
query90	2046	187	187	187
query91	185	153	147	147
query92	60	49	52	49
query93	1057	561	561	561
query94	822	296	285	285
query95	360	259	256	256
query96	611	283	280	280
query97	3351	3147	3145	3145
query98	214	208	200	200
query99	1486	1331	1313	1313
Total cold run time: 299617 ms
Total hot run time: 191098 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.02
query2	0.07	0.03	0.03
query3	0.23	0.07	0.07
query4	1.63	0.10	0.10
query5	0.51	0.51	0.53
query6	1.15	0.74	0.73
query7	0.03	0.02	0.02
query8	0.04	0.03	0.03
query9	0.57	0.51	0.50
query10	0.56	0.56	0.57
query11	0.14	0.10	0.11
query12	0.15	0.11	0.10
query13	0.60	0.60	0.60
query14	0.77	0.77	0.82
query15	0.85	0.83	0.83
query16	0.38	0.39	0.38
query17	1.01	0.98	1.03
query18	0.22	0.22	0.21
query19	1.88	1.80	1.86
query20	0.01	0.01	0.01
query21	15.42	0.59	0.55
query22	2.68	2.30	1.78
query23	16.94	1.24	0.86
query24	3.04	1.83	1.34
query25	0.31	0.27	0.10
query26	0.27	0.15	0.14
query27	0.05	0.03	0.04
query28	9.35	0.52	0.47
query29	12.58	3.24	3.28
query30	0.25	0.06	0.06
query31	2.86	0.37	0.38
query32	3.27	0.46	0.46
query33	2.99	2.96	3.04
query34	17.11	4.47	4.44
query35	4.52	4.54	4.50
query36	0.67	0.49	0.47
query37	0.09	0.06	0.06
query38	0.04	0.03	0.04
query39	0.04	0.02	0.02
query40	0.16	0.12	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: 103.64 s
Total hot run time: 30.42 s

@hubgeter
Copy link
Contributor Author

run buildall

@hubgeter
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17891	7069	6625	6625
q2	2073	189	189	189
q3	10577	1140	1136	1136
q4	10375	727	705	705
q5	7755	2912	2842	2842
q6	223	135	131	131
q7	975	648	607	607
q8	9354	1980	2048	1980
q9	6718	6450	6458	6450
q10	6994	2282	2341	2282
q11	461	267	259	259
q12	398	216	221	216
q13	17778	3004	3012	3004
q14	235	201	219	201
q15	512	469	468	468
q16	509	412	381	381
q17	989	565	575	565
q18	7450	6740	6717	6717
q19	1412	1070	1024	1024
q20	479	206	209	206
q21	4210	3135	3264	3135
q22	1111	983	979	979
Total cold run time: 108479 ms
Total hot run time: 40102 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6666	6622	6599	6599
q2	332	234	245	234
q3	2978	2986	2988	2986
q4	2042	1849	1797	1797
q5	5761	5750	5782	5750
q6	216	131	134	131
q7	2224	1791	1796	1791
q8	3396	3569	3578	3569
q9	8751	8851	8901	8851
q10	3596	3541	3499	3499
q11	597	512	519	512
q12	776	611	573	573
q13	9317	3186	3141	3141
q14	309	276	279	276
q15	504	469	471	469
q16	496	438	465	438
q17	1869	1641	1638	1638
q18	8456	7796	7702	7702
q19	1682	1593	1599	1593
q20	2082	1845	1866	1845
q21	5133	4957	4935	4935
q22	1117	1047	1035	1035
Total cold run time: 68300 ms
Total hot run time: 59364 ms

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (6/6) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 41.23% (10953/26565)
Line Coverage 32.02% (94030/293631)
Region Coverage 31.17% (48484/155540)
Branch Coverage 27.62% (24850/89970)

@doris-robot
Copy link

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

query1	1298	908	893	893
query2	6277	1929	1920	1920
query3	10806	4385	4331	4331
query4	33207	23810	23464	23464
query5	4198	449	476	449
query6	270	176	189	176
query7	3984	311	317	311
query8	282	232	223	223
query9	9469	2585	2589	2585
query10	485	266	259	259
query11	17886	15229	15250	15229
query12	151	102	104	102
query13	1579	449	431	431
query14	9552	7323	6854	6854
query15	258	189	189	189
query16	8040	484	513	484
query17	1664	621	623	621
query18	2191	327	332	327
query19	314	167	178	167
query20	123	126	119	119
query21	213	107	108	107
query22	4824	4417	4458	4417
query23	34846	34783	33790	33790
query24	11388	2923	2971	2923
query25	635	424	450	424
query26	1116	177	179	177
query27	3028	359	363	359
query28	8169	2194	2187	2187
query29	738	465	469	465
query30	275	166	154	154
query31	1055	836	871	836
query32	97	55	56	55
query33	768	307	301	301
query34	936	528	547	528
query35	896	744	724	724
query36	1112	973	946	946
query37	117	64	66	64
query38	4081	4051	3973	3973
query39	1504	1467	1614	1467
query40	261	105	107	105
query41	51	55	55	55
query42	124	105	99	99
query43	524	487	467	467
query44	1303	841	827	827
query45	188	172	173	172
query46	1181	789	738	738
query47	1998	1938	1902	1902
query48	476	384	388	384
query49	1011	448	388	388
query50	839	428	445	428
query51	7421	7267	7278	7267
query52	101	95	95	95
query53	270	192	189	189
query54	1155	479	477	477
query55	80	79	81	79
query56	272	264	249	249
query57	1304	1244	1217	1217
query58	229	231	220	220
query59	3198	3060	3043	3043
query60	294	264	261	261
query61	114	110	109	109
query62	881	750	694	694
query63	227	192	192	192
query64	5615	707	627	627
query65	3373	3277	3312	3277
query66	1243	317	302	302
query67	16169	15653	15483	15483
query68	4708	587	582	582
query69	441	268	279	268
query70	1203	1127	1094	1094
query71	350	247	253	247
query72	6120	4084	4069	4069
query73	768	358	362	358
query74	10598	8987	9098	8987
query75	3351	2658	2685	2658
query76	2682	1130	1077	1077
query77	370	271	271	271
query78	10507	9628	9575	9575
query79	1652	608	597	597
query80	1116	435	424	424
query81	564	223	221	221
query82	957	90	85	85
query83	250	144	143	143
query84	234	82	79	79
query85	1276	315	301	301
query86	378	283	300	283
query87	4489	4277	4318	4277
query88	3766	2430	2375	2375
query89	422	287	288	287
query90	1925	190	184	184
query91	180	150	153	150
query92	66	52	52	52
query93	1962	562	563	562
query94	815	285	313	285
query95	372	260	265	260
query96	615	285	281	281
query97	3307	3128	3173	3128
query98	229	200	200	200
query99	1512	1315	1319	1315
Total cold run time: 304919 ms
Total hot run time: 197052 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.02
query2	0.07	0.03	0.03
query3	0.24	0.07	0.06
query4	1.62	0.10	0.11
query5	0.53	0.51	0.51
query6	1.13	0.73	0.73
query7	0.02	0.01	0.02
query8	0.04	0.05	0.02
query9	0.56	0.51	0.50
query10	0.56	0.57	0.58
query11	0.14	0.10	0.11
query12	0.13	0.11	0.11
query13	0.61	0.61	0.60
query14	0.78	0.78	0.80
query15	0.84	0.82	0.84
query16	0.36	0.38	0.39
query17	1.03	1.05	1.06
query18	0.24	0.23	0.23
query19	1.98	1.85	1.83
query20	0.01	0.01	0.01
query21	15.41	0.58	0.58
query22	2.55	1.66	2.56
query23	17.04	0.89	0.79
query24	2.73	1.94	2.01
query25	0.21	0.16	0.09
query26	0.57	0.14	0.14
query27	0.05	0.04	0.04
query28	9.02	0.51	0.44
query29	12.63	3.23	3.22
query30	0.24	0.06	0.06
query31	2.86	0.39	0.38
query32	3.25	0.46	0.45
query33	2.96	3.01	3.02
query34	16.99	4.44	4.48
query35	4.54	4.56	4.52
query36	0.65	0.48	0.48
query37	0.09	0.06	0.07
query38	0.05	0.03	0.03
query39	0.04	0.02	0.02
query40	0.17	0.12	0.12
query41	0.08	0.03	0.03
query42	0.03	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 103.12 s
Total hot run time: 31.01 s

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (6/6) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 50.55% (13253/26220)
Line Coverage 41.18% (120754/293237)
Region Coverage 38.92% (70140/180203)
Branch Coverage 33.27% (33840/101728)

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit cd8d3f8 into apache:branch-3.0 Jul 18, 2025
21 of 23 checks passed
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.

4 participants