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

[fix](function) fix error result when STR_TO_DATE input all space (#4… #48921

Open
wants to merge 1 commit into
base: branch-3.0
Choose a base branch
from

Conversation

Mryange
Copy link
Contributor

@Mryange Mryange commented Mar 11, 2025

…8872)
#48872
before

mysql> select STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s');
+-----------------------------------------+
| STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s') |
+-----------------------------------------+
|                                         |
+-----------------------------------------+

now

mysql> select STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s');
+-----------------------------------------+
| STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s') |
+-----------------------------------------+
| NULL                                    |
+-----------------------------------------+

Problem Summary:

None

  • 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.

  • Confirm the release note

  • Confirm test cases

  • Confirm document

  • Add branch pick label

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

…ache#48872)

before
```
mysql> select STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s');
+-----------------------------------------+
| STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s') |
+-----------------------------------------+
|                                         |
+-----------------------------------------+
```
now
```
mysql> select STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s');
+-----------------------------------------+
| STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s') |
+-----------------------------------------+
| NULL                                    |
+-----------------------------------------+
```

Problem Summary:

None

- Test <!-- At least one of them must be included. -->
    - [x] Regression test
    - [x] 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 <!-- Add your reason?  -->

- Behavior changed:
    - [x] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
@Mryange Mryange requested a review from dataroaring as a code owner March 11, 2025 07:52
@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?

@Mryange
Copy link
Contributor Author

Mryange commented Mar 11, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17700	6740	6647	6647
q2	2062	168	162	162
q3	10744	1078	1184	1078
q4	10541	748	708	708
q5	7718	2809	2808	2808
q6	220	135	138	135
q7	971	640	609	609
q8	9371	1919	2003	1919
q9	6555	6373	6769	6373
q10	7040	2266	2285	2266
q11	464	265	263	263
q12	397	219	209	209
q13	17808	3005	2967	2967
q14	245	212	223	212
q15	509	461	459	459
q16	662	579	579	579
q17	973	525	646	525
q18	7274	6701	6662	6662
q19	1398	1036	1010	1010
q20	475	212	199	199
q21	3981	3285	3261	3261
q22	1100	964	993	964
Total cold run time: 108208 ms
Total hot run time: 40015 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6612	6619	6559	6559
q2	336	232	229	229
q3	2914	2767	2881	2767
q4	2079	1891	1840	1840
q5	5834	5710	5748	5710
q6	214	134	135	134
q7	2230	1852	1826	1826
q8	3345	3557	3517	3517
q9	8941	8807	8914	8807
q10	3540	3511	3549	3511
q11	589	501	511	501
q12	808	581	647	581
q13	8570	3189	3228	3189
q14	304	262	269	262
q15	513	467	469	467
q16	705	638	671	638
q17	1835	1618	1612	1612
q18	8127	7696	7795	7696
q19	1712	1556	1492	1492
q20	2099	1828	1865	1828
q21	5463	5546	5330	5330
q22	1116	1056	996	996
Total cold run time: 67886 ms
Total hot run time: 59492 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 197545 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 483de78fa8ae6fc4882912a762416426f81d053c, data reload: false

query1	1303	905	884	884
query2	6329	2032	1951	1951
query3	10788	4399	4282	4282
query4	61492	31492	23335	23335
query5	4768	470	468	468
query6	395	176	170	170
query7	5466	319	307	307
query8	304	237	212	212
query9	8477	2635	2631	2631
query10	448	268	265	265
query11	16406	15275	15836	15275
query12	163	110	105	105
query13	1486	486	444	444
query14	10368	7542	7733	7542
query15	198	188	177	177
query16	7130	471	467	467
query17	1290	564	576	564
query18	1802	330	313	313
query19	200	161	157	157
query20	115	106	111	106
query21	201	101	103	101
query22	4663	4380	4882	4380
query23	34545	33639	34012	33639
query24	6419	2949	2889	2889
query25	504	424	423	423
query26	675	173	180	173
query27	1903	359	373	359
query28	4238	2523	2474	2474
query29	741	484	457	457
query30	257	180	175	175
query31	999	872	839	839
query32	70	61	59	59
query33	469	322	297	297
query34	916	521	530	521
query35	879	739	764	739
query36	1095	971	988	971
query37	117	70	75	70
query38	4205	4060	4027	4027
query39	1530	1538	1479	1479
query40	201	103	104	103
query41	53	55	52	52
query42	123	106	104	104
query43	539	492	499	492
query44	1190	826	834	826
query45	191	171	170	170
query46	1184	760	712	712
query47	2014	1916	1884	1884
query48	491	402	403	402
query49	754	403	420	403
query50	843	447	447	447
query51	7282	7264	7271	7264
query52	103	93	94	93
query53	273	187	184	184
query54	580	457	482	457
query55	77	77	88	77
query56	279	274	254	254
query57	1288	1170	1208	1170
query58	251	213	221	213
query59	3236	3161	3008	3008
query60	286	259	284	259
query61	148	109	112	109
query62	757	664	684	664
query63	224	188	193	188
query64	1376	654	623	623
query65	3269	3206	3253	3206
query66	696	295	305	295
query67	15811	15527	15503	15503
query68	4136	613	587	587
query69	420	270	267	267
query70	1192	1165	1106	1106
query71	356	266	264	264
query72	6330	4009	3918	3918
query73	749	351	363	351
query74	10401	9061	9247	9061
query75	3340	2658	2664	2658
query76	1954	1054	1108	1054
query77	503	279	285	279
query78	10504	9634	9590	9590
query79	1309	612	600	600
query80	837	433	428	428
query81	513	237	241	237
query82	1322	91	87	87
query83	247	149	140	140
query84	279	86	85	85
query85	885	322	291	291
query86	349	300	272	272
query87	4371	4300	4352	4300
query88	3417	2429	2387	2387
query89	407	288	291	288
query90	1951	189	188	188
query91	187	152	146	146
query92	60	52	51	51
query93	1395	564	561	561
query94	728	289	281	281
query95	370	273	258	258
query96	607	283	278	278
query97	3324	3143	3238	3143
query98	216	203	202	202
query99	1541	1298	1340	1298
Total cold run time: 311073 ms
Total hot run time: 197545 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.02	0.03
query3	0.24	0.06	0.06
query4	1.62	0.10	0.10
query5	0.51	0.52	0.51
query6	1.16	0.74	0.74
query7	0.02	0.01	0.01
query8	0.04	0.03	0.04
query9	0.57	0.51	0.51
query10	0.57	0.56	0.56
query11	0.15	0.11	0.09
query12	0.14	0.11	0.11
query13	0.61	0.60	0.60
query14	2.72	2.74	2.86
query15	0.90	0.84	0.83
query16	0.40	0.38	0.38
query17	1.07	1.09	1.01
query18	0.24	0.21	0.22
query19	1.96	1.88	2.02
query20	0.01	0.01	0.01
query21	15.36	0.58	0.57
query22	2.87	2.14	1.69
query23	17.18	0.99	0.82
query24	3.63	1.68	0.79
query25	0.16	0.23	0.06
query26	0.46	0.14	0.13
query27	0.03	0.03	0.05
query28	9.56	0.49	0.47
query29	12.62	3.20	3.21
query30	0.25	0.06	0.06
query31	2.88	0.40	0.38
query32	3.23	0.47	0.46
query33	2.99	2.98	3.11
query34	16.76	4.47	4.46
query35	4.51	4.55	4.50
query36	0.67	0.47	0.53
query37	0.10	0.07	0.06
query38	0.05	0.04	0.03
query39	0.03	0.02	0.02
query40	0.16	0.13	0.12
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.03	0.04	0.03
Total cold run time: 106.69 s
Total hot run time: 31.8 s

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.

3 participants