Skip to content

Conversation

@zclllyybb
Copy link
Contributor

pick #55013

when the input datetime has decimal part start with zero, the result was
wrong before. now fixed.

before:
```sql
mysql> select UNIX_TIMESTAMP('2015-11-13 10:20:19.012');
+-------------------------------------------+
| UNIX_TIMESTAMP('2015-11-13 10:20:19.012') |
+-------------------------------------------+
|                            1447381219.120 |
+-------------------------------------------+
```

now:
```sql
mysql> select UNIX_TIMESTAMP('2015-11-13 10:20:19.012');
+-------------------------------------------+
| UNIX_TIMESTAMP('2015-11-13 10:20:19.012') |
+-------------------------------------------+
|                            1447381219.012 |
+-------------------------------------------+
```
@zclllyybb zclllyybb requested a review from morrySnow as a code owner August 25, 2025 13:16
@zclllyybb
Copy link
Contributor Author

run buildall

@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?

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17596	5500	5428	5428
q2	2028	385	270	270
q3	12186	1252	736	736
q4	10288	873	459	459
q5	8935	2381	2101	2101
q6	183	166	133	133
q7	889	751	603	603
q8	9326	1425	1108	1108
q9	5330	4899	4850	4850
q10	6738	2257	1798	1798
q11	465	281	258	258
q12	329	348	221	221
q13	17788	3620	3019	3019
q14	223	222	206	206
q15	519	478	456	456
q16	409	422	369	369
q17	608	840	354	354
q18	6936	6366	6448	6366
q19	1221	942	520	520
q20	326	325	201	201
q21	2768	2121	1927	1927
q22	1063	1038	962	962
Total cold run time: 106154 ms
Total hot run time: 32345 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5521	5490	5522	5490
q2	234	334	241	241
q3	2257	2645	2286	2286
q4	1380	1795	1411	1411
q5	4332	4925	4934	4925
q6	165	165	126	126
q7	2016	1962	1770	1770
q8	2601	2842	2688	2688
q9	7326	7345	7300	7300
q10	3053	3362	2793	2793
q11	561	512	497	497
q12	698	783	642	642
q13	3612	3947	3340	3340
q14	293	289	275	275
q15	532	483	462	462
q16	468	502	455	455
q17	1242	1789	1259	1259
q18	7833	7648	7451	7451
q19	848	1125	1108	1108
q20	2018	2047	1897	1897
q21	5480	4854	4438	4438
q22	1106	1047	1045	1045
Total cold run time: 53576 ms
Total hot run time: 51899 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192500 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 10190434e35e48973ce354b8f2409c300d0b296b, data reload: false

query1	947	402	403	402
query2	6276	1930	1927	1927
query3	8681	196	198	196
query4	33375	23792	23591	23591
query5	3668	629	468	468
query6	303	203	189	189
query7	4218	505	320	320
query8	302	242	244	242
query9	9466	2615	2604	2604
query10	470	340	269	269
query11	17964	15387	15378	15378
query12	154	111	104	104
query13	1548	555	412	412
query14	9057	6803	7917	6803
query15	233	187	181	181
query16	8072	624	496	496
query17	1606	790	595	595
query18	2136	419	340	340
query19	242	194	171	171
query20	134	119	119	119
query21	212	128	106	106
query22	4566	4482	4286	4286
query23	34625	33731	34069	33731
query24	7583	2735	2744	2735
query25	531	492	430	430
query26	912	287	176	176
query27	2011	509	360	360
query28	5102	2192	2165	2165
query29	718	596	473	473
query30	252	189	169	169
query31	991	914	868	868
query32	90	61	66	61
query33	501	392	328	328
query34	773	913	549	549
query35	813	820	757	757
query36	1027	1050	947	947
query37	105	94	72	72
query38	4091	4083	3927	3927
query39	1528	1479	1469	1469
query40	207	128	110	110
query41	53	53	50	50
query42	123	111	106	106
query43	518	545	499	499
query44	1363	824	838	824
query45	188	179	179	179
query46	934	1059	705	705
query47	2042	1960	1919	1919
query48	450	452	357	357
query49	745	500	405	405
query50	686	707	434	434
query51	7308	7374	7179	7179
query52	105	107	106	106
query53	238	264	198	198
query54	555	547	494	494
query55	81	79	83	79
query56	284	276	254	254
query57	1286	1266	1197	1197
query58	239	220	224	220
query59	3069	3194	3153	3153
query60	339	298	274	274
query61	114	112	121	112
query62	777	744	698	698
query63	234	198	195	195
query64	3831	1024	661	661
query65	3427	3325	3294	3294
query66	800	429	316	316
query67	16369	15903	15492	15492
query68	7821	852	549	549
query69	496	303	267	267
query70	1198	1123	1117	1117
query71	440	314	270	270
query72	5165	3768	3688	3688
query73	655	773	361	361
query74	10549	9359	9335	9335
query75	3902	3163	2686	2686
query76	3553	1123	783	783
query77	769	381	274	274
query78	10251	10294	9628	9628
query79	5603	893	595	595
query80	692	528	448	448
query81	489	270	227	227
query82	228	122	93	93
query83	166	166	148	148
query84	296	103	78	78
query85	749	384	296	296
query86	345	314	312	312
query87	4376	4253	4275	4253
query88	4431	2515	2480	2480
query89	435	347	292	292
query90	2063	192	193	192
query91	135	136	112	112
query92	68	58	50	50
query93	3719	883	539	539
query94	664	392	314	314
query95	351	293	273	273
query96	498	620	282	282
query97	3208	3269	3165	3165
query98	223	210	196	196
query99	1496	1434	1271	1271
Total cold run time: 296682 ms
Total hot run time: 192500 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.03	0.04
query3	0.23	0.06	0.07
query4	1.62	0.11	0.10
query5	0.50	0.52	0.50
query6	1.13	0.74	0.73
query7	0.02	0.01	0.01
query8	0.04	0.03	0.03
query9	0.57	0.49	0.49
query10	0.54	0.54	0.55
query11	0.14	0.10	0.10
query12	0.13	0.11	0.11
query13	0.61	0.59	0.59
query14	0.78	0.79	0.79
query15	0.83	0.83	0.82
query16	0.38	0.40	0.39
query17	1.02	1.05	0.98
query18	0.24	0.23	0.24
query19	1.95	1.90	1.88
query20	0.01	0.01	0.01
query21	15.39	0.88	0.58
query22	0.74	0.67	0.65
query23	15.24	1.40	0.61
query24	2.76	1.30	0.87
query25	0.32	0.17	0.07
query26	0.17	0.16	0.14
query27	0.05	0.05	0.04
query28	13.88	1.06	0.42
query29	12.54	3.97	3.25
query30	0.25	0.09	0.07
query31	2.83	0.60	0.38
query32	3.22	0.53	0.46
query33	3.02	3.03	3.04
query34	16.74	5.14	4.54
query35	4.52	4.61	4.55
query36	0.64	0.48	0.48
query37	0.09	0.06	0.06
query38	0.04	0.04	0.03
query39	0.03	0.02	0.03
query40	0.17	0.14	0.12
query41	0.08	0.03	0.02
query42	0.03	0.03	0.02
query43	0.04	0.03	0.03
Total cold run time: 103.63 s
Total hot run time: 28.86 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 0.00% (0/4) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 45.48% (12721/27972)
Line Coverage 36.36% (113366/311826)
Region Coverage 34.00% (64913/190900)
Branch Coverage 31.04% (34071/109776)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 0.00% (0/1) 🎉
Increment coverage report
Complete coverage report

@morrySnow morrySnow closed this Aug 28, 2025
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