Skip to content

Conversation

@morrySnow
Copy link
Contributor

@morrySnow morrySnow commented Sep 30, 2025

  • date_trunc
  • from_second
  • from_millsecond

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 Sep 30, 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?

@morrySnow
Copy link
Contributor Author

run buildall

@morrySnow morrySnow force-pushed the date_trunc_fold_lose_scale branch from 15ee4d9 to 236db11 Compare September 30, 2025 08:23
@morrySnow morrySnow changed the title [fix](fold constant) date_trunc lose scale when do folding [fix](fold constant) fix result's scale of some datetime related function Sep 30, 2025
@morrySnow
Copy link
Contributor Author

run buildall

Copy link
Contributor

@dwdwqfwe dwdwqfwe 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 anyone and no changes requested.

@doris-robot
Copy link

TPC-DS: Total hot run time: 190510 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 236db11a3a994e5668f7c189698c1a665510dbc9, data reload: false

query1	1063	442	408	408
query2	6569	1726	1709	1709
query3	6764	225	221	221
query4	25939	23720	23358	23358
query5	5837	680	483	483
query6	330	232	215	215
query7	4656	504	295	295
query8	306	254	246	246
query9	8708	2574	2566	2566
query10	560	334	297	297
query11	15209	15075	15127	15075
query12	199	118	113	113
query13	1681	565	418	418
query14	12557	9244	9236	9236
query15	249	197	181	181
query16	7761	691	565	565
query17	1598	765	641	641
query18	2183	486	353	353
query19	283	269	191	191
query20	144	140	133	133
query21	220	152	128	128
query22	5055	5007	4692	4692
query23	34533	33727	33669	33669
query24	8372	2514	2513	2513
query25	583	560	506	506
query26	2103	292	163	163
query27	2834	539	383	383
query28	4360	2206	2181	2181
query29	791	648	526	526
query30	346	234	202	202
query31	899	839	803	803
query32	88	71	73	71
query33	621	402	357	357
query34	843	909	551	551
query35	874	904	825	825
query36	1021	1055	974	974
query37	130	125	112	112
query38	3778	3597	3543	3543
query39	1479	1429	1414	1414
query40	215	125	113	113
query41	60	57	60	57
query42	119	118	112	112
query43	490	483	460	460
query44	1339	835	827	827
query45	184	184	178	178
query46	843	1003	643	643
query47	1795	1891	1769	1769
query48	399	426	316	316
query49	756	493	427	427
query50	637	690	421	421
query51	3942	3989	3857	3857
query52	121	142	98	98
query53	232	260	198	198
query54	596	584	520	520
query55	83	78	81	78
query56	336	330	308	308
query57	1189	1191	1142	1142
query58	292	282	270	270
query59	2566	2699	2527	2527
query60	349	354	324	324
query61	156	149	156	149
query62	778	718	687	687
query63	228	198	190	190
query64	4391	1180	874	874
query65	4068	3938	4020	3938
query66	1034	434	349	349
query67	15703	15326	15279	15279
query68	7966	957	592	592
query69	532	322	296	296
query70	1407	1186	1314	1186
query71	532	343	320	320
query72	5796	4886	4974	4886
query73	682	598	358	358
query74	9304	8925	8611	8611
query75	4107	3278	2840	2840
query76	3694	1179	742	742
query77	807	404	319	319
query78	9587	9767	8935	8935
query79	2026	818	596	596
query80	731	564	500	500
query81	490	266	228	228
query82	433	160	139	139
query83	292	269	254	254
query84	305	106	93	93
query85	872	470	430	430
query86	337	330	293	293
query87	3761	3713	3622	3622
query88	2883	2267	2273	2267
query89	430	346	297	297
query90	2019	221	220	220
query91	156	167	133	133
query92	92	67	64	64
query93	1270	955	641	641
query94	692	456	302	302
query95	395	324	305	305
query96	489	583	281	281
query97	2945	2969	2846	2846
query98	230	222	214	214
query99	1424	1434	1272	1272
Total cold run time: 281113 ms
Total hot run time: 190510 ms

@doris-robot
Copy link

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

query1	0.07	0.05	0.05
query2	0.09	0.05	0.06
query3	0.25	0.08	0.09
query4	1.61	0.11	0.12
query5	0.28	0.26	0.25
query6	1.19	0.66	0.64
query7	0.03	0.03	0.03
query8	0.07	0.05	0.05
query9	0.62	0.52	0.51
query10	0.57	0.58	0.58
query11	0.17	0.12	0.11
query12	0.18	0.12	0.12
query13	0.63	0.63	0.61
query14	1.03	1.06	1.04
query15	0.85	0.83	0.85
query16	0.41	0.41	0.40
query17	1.05	1.05	1.09
query18	0.20	0.20	0.19
query19	1.94	1.90	1.83
query20	0.01	0.02	0.01
query21	15.47	0.93	0.57
query22	0.76	1.24	0.64
query23	14.92	1.43	0.62
query24	7.22	0.96	1.00
query25	0.46	0.22	0.15
query26	0.46	0.17	0.14
query27	0.08	0.06	0.05
query28	9.54	1.40	0.92
query29	12.55	3.86	3.24
query30	0.28	0.14	0.11
query31	2.83	0.60	0.40
query32	3.23	0.55	0.48
query33	3.12	3.05	3.11
query34	16.20	5.47	4.85
query35	4.83	4.89	4.92
query36	0.71	0.51	0.49
query37	0.10	0.08	0.08
query38	0.07	0.05	0.04
query39	0.04	0.03	0.03
query40	0.17	0.16	0.14
query41	0.09	0.02	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.06
Total cold run time: 104.46 s
Total hot run time: 30.48 s

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 81.82% (9/11) 🎉
Increment coverage report
Complete coverage report

…tion

- date_trunc
- from_second
- from_millsecond
@morrySnow morrySnow force-pushed the date_trunc_fold_lose_scale branch from 236db11 to 31d7908 Compare October 10, 2025 09:02
@morrySnow
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-DS: Total hot run time: 190647 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 31d7908353ea1c22107ed9a5a75a9e68b2967d99, data reload: false

query1	1064	425	423	423
query2	6544	1677	1709	1677
query3	6759	233	222	222
query4	27083	23714	23025	23025
query5	5823	660	493	493
query6	354	244	240	240
query7	4664	499	292	292
query8	314	258	281	258
query9	8723	2550	2541	2541
query10	572	342	283	283
query11	15881	15036	15653	15036
query12	205	124	120	120
query13	1816	568	469	469
query14	12771	9680	9594	9594
query15	294	200	186	186
query16	8995	700	503	503
query17	1591	803	686	686
query18	2164	457	352	352
query19	305	224	196	196
query20	138	131	141	131
query21	207	135	121	121
query22	4815	4702	4710	4702
query23	34760	33725	33613	33613
query24	8216	2522	2484	2484
query25	560	548	453	453
query26	1230	266	170	170
query27	2693	499	353	353
query28	4357	2164	2157	2157
query29	803	594	466	466
query30	290	230	198	198
query31	917	822	734	734
query32	87	70	69	69
query33	580	376	316	316
query34	789	849	528	528
query35	796	824	736	736
query36	972	1032	926	926
query37	123	113	81	81
query38	3592	3554	3469	3469
query39	1446	1414	1415	1414
query40	219	135	126	126
query41	71	62	68	62
query42	122	107	113	107
query43	486	509	500	500
query44	1336	849	845	845
query45	185	190	175	175
query46	841	996	638	638
query47	1786	1866	1753	1753
query48	394	421	319	319
query49	797	507	432	432
query50	662	686	412	412
query51	3857	3960	3916	3916
query52	113	112	99	99
query53	238	266	197	197
query54	591	597	538	538
query55	87	83	82	82
query56	317	309	337	309
query57	1181	1210	1134	1134
query58	277	288	280	280
query59	2579	2646	2518	2518
query60	351	339	332	332
query61	160	207	153	153
query62	789	713	681	681
query63	233	198	190	190
query64	4454	1162	835	835
query65	4045	3960	3950	3950
query66	1032	429	329	329
query67	15813	15420	15227	15227
query68	8051	938	593	593
query69	529	334	285	285
query70	1361	1239	1346	1239
query71	512	339	324	324
query72	5954	5026	5083	5026
query73	638	600	471	471
query74	8843	8968	8985	8968
query75	4117	3350	2833	2833
query76	3605	1166	762	762
query77	815	398	320	320
query78	9718	9690	8880	8880
query79	2029	810	594	594
query80	662	563	498	498
query81	515	258	230	230
query82	458	177	137	137
query83	269	266	255	255
query84	258	109	88	88
query85	970	466	433	433
query86	343	314	307	307
query87	3744	3786	3610	3610
query88	3767	2234	2221	2221
query89	390	323	296	296
query90	2019	215	214	214
query91	162	164	137	137
query92	83	73	69	69
query93	1558	979	648	648
query94	669	439	349	349
query95	396	314	313	313
query96	482	582	278	278
query97	2944	2978	2882	2882
query98	237	222	210	210
query99	1462	1424	1321	1321
Total cold run time: 283869 ms
Total hot run time: 190647 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.05
query2	0.09	0.06	0.06
query3	0.25	0.08	0.08
query4	1.60	0.12	0.12
query5	0.29	0.26	0.27
query6	1.18	0.63	0.64
query7	0.04	0.03	0.03
query8	0.05	0.04	0.04
query9	0.64	0.53	0.54
query10	0.58	0.61	0.60
query11	0.16	0.11	0.11
query12	0.16	0.12	0.12
query13	0.64	0.62	0.62
query14	1.04	1.02	1.02
query15	0.87	0.85	0.87
query16	0.42	0.42	0.41
query17	1.05	1.05	1.05
query18	0.22	0.19	0.20
query19	1.95	1.93	1.89
query20	0.02	0.01	0.01
query21	15.43	0.93	0.58
query22	0.75	1.24	0.63
query23	14.95	1.39	0.68
query24	6.64	1.10	1.35
query25	0.52	0.30	0.25
query26	0.60	0.15	0.14
query27	0.08	0.06	0.06
query28	10.38	1.38	0.93
query29	12.54	3.88	3.27
query30	0.28	0.13	0.14
query31	2.82	0.61	0.38
query32	3.23	0.56	0.47
query33	3.09	3.13	3.09
query34	16.06	5.44	4.82
query35	4.93	4.91	4.91
query36	0.71	0.52	0.50
query37	0.11	0.08	0.07
query38	0.07	0.05	0.04
query39	0.03	0.03	0.03
query40	0.18	0.15	0.17
query41	0.09	0.03	0.03
query42	0.04	0.02	0.02
query43	0.04	0.04	0.04
Total cold run time: 104.88 s
Total hot run time: 30.99 s

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 100.00% (11/11) 🎉
Increment coverage report
Complete coverage report

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

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

@morrySnow morrySnow merged commit 4274595 into apache:master Oct 11, 2025
26 checks passed
@morrySnow morrySnow deleted the date_trunc_fold_lose_scale branch October 11, 2025 06:13
github-actions bot pushed a commit that referenced this pull request Oct 11, 2025
…tion (#56671)

- date_trunc
- from_second
- from_millsecond
yiguolei pushed a commit that referenced this pull request Oct 11, 2025
…related function #56671 (#56831)

Cherry-picked from #56671

Co-authored-by: morrySnow <[email protected]>
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/3.1.3-merged dev/4.0.1-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants