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

[enhance](nerieds) month, day, hour, minute, second, day_of_year, day_of_month, week_of_year implement monotonic #45928

Merged
merged 13 commits into from
Jan 3, 2025

Conversation

feiniaofeiafei
Copy link
Contributor

@feiniaofeiafei feiniaofeiafei commented Dec 25, 2024

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

@Thearas
Copy link
Contributor

Thearas commented Dec 25, 2024

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?

@feiniaofeiafei feiniaofeiafei force-pushed the add_monotonic_function3 branch from ee2242f to b83f511 Compare December 25, 2024 08:00
@feiniaofeiafei
Copy link
Contributor Author

run buildall

@feiniaofeiafei feiniaofeiafei force-pushed the add_monotonic_function3 branch 2 times, most recently from 6b3811f to 46efea6 Compare December 25, 2024 08:22
@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17586	6320	6009	6009
q2	2044	309	161	161
q3	10423	1225	724	724
q4	10225	857	416	416
q5	8070	2191	1976	1976
q6	209	184	146	146
q7	892	757	600	600
q8	9231	1375	1167	1167
q9	5283	4886	4939	4886
q10	6753	2310	1853	1853
q11	472	284	261	261
q12	347	352	212	212
q13	17759	3619	2907	2907
q14	224	230	212	212
q15	567	495	493	493
q16	612	605	601	601
q17	569	844	317	317
q18	6987	6387	6416	6387
q19	1324	957	530	530
q20	302	314	188	188
q21	3103	2179	1969	1969
q22	360	331	302	302
Total cold run time: 103342 ms
Total hot run time: 32317 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6282	6143	6221	6143
q2	233	323	229	229
q3	2286	2634	2302	2302
q4	1451	1845	1366	1366
q5	4365	4726	4756	4726
q6	185	176	146	146
q7	2075	1948	1837	1837
q8	2608	2778	2696	2696
q9	7297	7261	7340	7261
q10	3083	3349	2875	2875
q11	568	499	489	489
q12	655	722	586	586
q13	3364	3805	3091	3091
q14	296	331	266	266
q15	568	513	507	507
q16	669	690	642	642
q17	1225	1748	1288	1288
q18	7666	7432	7297	7297
q19	819	1186	1056	1056
q20	1949	2110	1908	1908
q21	5773	5418	4936	4936
q22	619	594	576	576
Total cold run time: 54036 ms
Total hot run time: 52223 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 197854 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 46efea69d8bf1ab53b5ab3a801cb66ecbed66761, data reload: false

query1	1289	939	910	910
query2	6344	2307	2301	2301
query3	10965	4679	4752	4679
query4	33471	23686	23371	23371
query5	4771	652	496	496
query6	303	196	179	179
query7	3999	486	298	298
query8	295	258	232	232
query9	9436	2752	2742	2742
query10	475	324	259	259
query11	18229	15274	15348	15274
query12	173	107	105	105
query13	1579	561	437	437
query14	10561	6838	7520	6838
query15	239	220	185	185
query16	7992	646	467	467
query17	1498	783	575	575
query18	2102	410	322	322
query19	218	188	171	171
query20	129	129	114	114
query21	205	129	107	107
query22	4805	4728	4484	4484
query23	34540	34460	33551	33551
query24	6538	2401	2380	2380
query25	499	487	424	424
query26	728	259	157	157
query27	2005	496	342	342
query28	5447	2521	2512	2512
query29	574	565	462	462
query30	219	188	165	165
query31	1052	932	846	846
query32	81	143	59	59
query33	469	344	308	308
query34	771	881	520	520
query35	829	834	758	758
query36	1042	1061	999	999
query37	123	103	77	77
query38	4144	4221	4158	4158
query39	1514	1460	1452	1452
query40	203	121	103	103
query41	44	48	43	43
query42	121	106	103	103
query43	519	541	479	479
query44	1367	815	818	815
query45	189	182	171	171
query46	901	1086	670	670
query47	2019	2033	1907	1907
query48	389	415	332	332
query49	719	497	396	396
query50	670	676	401	401
query51	7288	7194	7332	7194
query52	108	102	93	93
query53	231	265	191	191
query54	508	520	427	427
query55	84	82	78	78
query56	288	260	256	256
query57	1270	1264	1158	1158
query58	243	235	238	235
query59	3125	3297	3116	3116
query60	274	271	266	266
query61	116	113	107	107
query62	889	839	756	756
query63	243	193	204	193
query64	3173	1071	678	678
query65	3348	3316	3265	3265
query66	775	417	326	326
query67	16539	15894	15567	15567
query68	9353	762	529	529
query69	494	294	255	255
query70	1203	1143	1157	1143
query71	432	298	254	254
query72	5815	3845	3879	3845
query73	677	776	356	356
query74	10339	9425	9420	9420
query75	4614	3186	2671	2671
query76	5264	1205	786	786
query77	1018	373	282	282
query78	10079	10117	10054	10054
query79	4568	904	602	602
query80	702	525	437	437
query81	498	279	232	232
query82	212	145	120	120
query83	189	167	153	153
query84	289	92	67	67
query85	748	357	307	307
query86	345	327	297	297
query87	4614	4554	4502	4502
query88	4081	2246	2211	2211
query89	420	335	297	297
query90	2152	188	186	186
query91	133	138	101	101
query92	67	54	50	50
query93	2252	888	535	535
query94	678	387	295	295
query95	335	279	254	254
query96	493	617	285	285
query97	2711	2799	2656	2656
query98	219	204	203	203
query99	1693	1576	1427	1427
Total cold run time: 301983 ms
Total hot run time: 197854 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.07	0.03	0.03
query3	0.23	0.07	0.07
query4	1.62	0.11	0.10
query5	0.43	0.38	0.42
query6	1.15	0.65	0.65
query7	0.02	0.01	0.02
query8	0.04	0.03	0.03
query9	0.58	0.51	0.52
query10	0.56	0.60	0.55
query11	0.16	0.11	0.11
query12	0.13	0.11	0.11
query13	0.60	0.60	0.60
query14	2.73	2.84	2.86
query15	0.91	0.85	0.81
query16	0.39	0.39	0.39
query17	1.02	1.00	1.02
query18	0.22	0.21	0.21
query19	1.90	1.87	2.06
query20	0.02	0.01	0.02
query21	15.36	0.96	0.58
query22	0.75	0.98	0.76
query23	15.06	1.44	0.55
query24	3.25	0.72	1.63
query25	0.31	0.21	0.05
query26	0.23	0.14	0.14
query27	0.04	0.05	0.05
query28	13.65	1.51	1.04
query29	12.61	4.01	3.30
query30	0.25	0.09	0.05
query31	2.82	0.59	0.38
query32	3.22	0.54	0.46
query33	3.15	3.20	3.15
query34	16.86	5.07	4.48
query35	4.50	4.47	4.51
query36	0.64	0.49	0.50
query37	0.10	0.06	0.05
query38	0.05	0.04	0.04
query39	0.03	0.02	0.02
query40	0.16	0.13	0.12
query41	0.08	0.03	0.02
query42	0.03	0.02	0.02
query43	0.04	0.04	0.03
Total cold run time: 106.01 s
Total hot run time: 31.28 s

@feiniaofeiafei feiniaofeiafei force-pushed the add_monotonic_function3 branch 2 times, most recently from 1e2a845 to 1ee003d Compare December 25, 2024 09:28
@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17602	6220	6095	6095
q2	2050	292	166	166
q3	10439	1252	709	709
q4	10209	856	427	427
q5	7511	2172	1974	1974
q6	220	185	149	149
q7	876	737	591	591
q8	9217	1331	1122	1122
q9	5305	4962	4852	4852
q10	6768	2322	1868	1868
q11	482	282	266	266
q12	347	354	227	227
q13	17773	3539	2967	2967
q14	236	239	215	215
q15	556	527	496	496
q16	644	620	591	591
q17	546	841	327	327
q18	7225	6583	6453	6453
q19	1427	962	553	553
q20	299	325	185	185
q21	2794	2145	1946	1946
q22	358	335	312	312
Total cold run time: 102884 ms
Total hot run time: 32491 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6285	6257	6280	6257
q2	234	326	236	236
q3	2266	2656	2343	2343
q4	1428	1804	1348	1348
q5	4356	4743	4793	4743
q6	185	180	143	143
q7	2147	1977	1854	1854
q8	2600	2787	2657	2657
q9	7366	7169	7349	7169
q10	3360	3341	2782	2782
q11	587	543	515	515
q12	675	737	635	635
q13	3344	3766	3146	3146
q14	284	319	295	295
q15	569	509	504	504
q16	672	683	631	631
q17	1231	1728	1250	1250
q18	7685	7505	7146	7146
q19	794	1090	1048	1048
q20	1961	1952	1841	1841
q21	5400	5075	4817	4817
q22	628	636	591	591
Total cold run time: 54057 ms
Total hot run time: 51951 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 189928 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 1ee003d54a62c8b53056df53045cec012f2b5ee1, data reload: false

query1	978	387	382	382
query2	6537	2428	2286	2286
query3	6710	218	221	218
query4	33561	23578	23286	23286
query5	4332	615	456	456
query6	282	206	199	199
query7	4619	479	301	301
query8	302	250	253	250
query9	9526	2751	2776	2751
query10	467	326	262	262
query11	18053	15618	15145	15145
query12	163	104	105	104
query13	1666	558	414	414
query14	10297	6897	7624	6897
query15	262	196	193	193
query16	7401	617	445	445
query17	1593	759	569	569
query18	1933	412	282	282
query19	214	176	147	147
query20	119	113	111	111
query21	210	122	107	107
query22	4560	4561	4421	4421
query23	35036	33442	33538	33442
query24	6360	2267	2231	2231
query25	499	432	380	380
query26	1207	267	156	156
query27	2218	455	333	333
query28	5240	2439	2422	2422
query29	678	536	404	404
query30	225	184	149	149
query31	992	881	822	822
query32	110	66	61	61
query33	506	342	315	315
query34	746	824	502	502
query35	794	798	752	752
query36	1036	1032	944	944
query37	114	99	77	77
query38	4125	4122	4131	4122
query39	1476	1426	1432	1426
query40	201	123	96	96
query41	47	45	51	45
query42	126	99	102	99
query43	534	538	490	490
query44	1298	810	818	810
query45	180	175	170	170
query46	863	1053	638	638
query47	1940	1905	1886	1886
query48	372	397	316	316
query49	768	463	382	382
query50	625	647	372	372
query51	7213	7334	7119	7119
query52	101	101	90	90
query53	222	251	186	186
query54	479	481	399	399
query55	78	84	81	81
query56	260	248	227	227
query57	1177	1172	1132	1132
query58	230	225	229	225
query59	2929	3123	2867	2867
query60	260	262	253	253
query61	109	107	105	105
query62	872	792	748	748
query63	222	191	190	190
query64	4570	1005	652	652
query65	3297	3242	3213	3213
query66	1051	425	308	308
query67	15968	15933	15574	15574
query68	9184	762	524	524
query69	463	293	250	250
query70	1251	1219	1134	1134
query71	423	279	252	252
query72	6016	3858	3817	3817
query73	656	747	366	366
query74	9760	9004	8831	8831
query75	4704	3141	2670	2670
query76	5399	1189	777	777
query77	921	375	273	273
query78	10064	10582	9427	9427
query79	4516	890	587	587
query80	716	533	420	420
query81	483	278	227	227
query82	578	157	130	130
query83	202	168	150	150
query84	284	84	67	67
query85	771	371	304	304
query86	344	295	308	295
query87	4691	4502	4413	4413
query88	3531	2247	2194	2194
query89	433	343	310	310
query90	2047	187	187	187
query91	144	134	114	114
query92	65	57	54	54
query93	2479	856	537	537
query94	659	391	287	287
query95	343	262	256	256
query96	483	610	287	287
query97	2724	2806	2694	2694
query98	221	200	202	200
query99	1705	1556	1457	1457
Total cold run time: 297399 ms
Total hot run time: 189928 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.04	0.03
query3	0.23	0.07	0.07
query4	1.62	0.11	0.10
query5	0.43	0.43	0.42
query6	1.14	0.65	0.66
query7	0.02	0.01	0.02
query8	0.04	0.03	0.04
query9	0.57	0.51	0.51
query10	0.58	0.60	0.57
query11	0.15	0.10	0.10
query12	0.13	0.11	0.11
query13	0.60	0.59	0.62
query14	2.85	2.84	2.72
query15	0.90	0.82	0.83
query16	0.38	0.39	0.39
query17	1.04	1.07	1.04
query18	0.23	0.21	0.20
query19	1.96	1.86	2.05
query20	0.01	0.01	0.01
query21	15.36	0.89	0.58
query22	0.76	0.83	0.63
query23	15.29	1.44	0.56
query24	3.11	1.82	0.45
query25	0.22	0.27	0.09
query26	0.36	0.14	0.14
query27	0.05	0.05	0.04
query28	13.05	1.53	1.04
query29	12.56	3.93	3.27
query30	0.25	0.09	0.06
query31	2.85	0.61	0.37
query32	3.23	0.55	0.47
query33	3.03	3.06	3.11
query34	16.88	5.11	4.54
query35	4.60	4.51	4.51
query36	0.64	0.48	0.46
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.03	0.02	0.03
query40	0.17	0.14	0.13
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 105.7 s
Total hot run time: 30.84 s

@feiniaofeiafei
Copy link
Contributor Author

run p0

@feiniaofeiafei
Copy link
Contributor Author

run feut

@feiniaofeiafei feiniaofeiafei force-pushed the add_monotonic_function3 branch 2 times, most recently from 5c185ed to bb6fccd Compare December 26, 2024 11:43
@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17577	6717	6065	6065
q2	2045	313	175	175
q3	10402	1268	755	755
q4	10226	859	438	438
q5	7528	2184	1990	1990
q6	220	187	147	147
q7	899	759	613	613
q8	9238	1369	1205	1205
q9	5168	4879	4929	4879
q10	6755	2320	1868	1868
q11	491	286	267	267
q12	359	373	225	225
q13	17773	3609	2983	2983
q14	248	241	216	216
q15	552	524	498	498
q16	631	618	590	590
q17	566	867	343	343
q18	7051	6547	6482	6482
q19	1238	966	580	580
q20	320	328	194	194
q21	2828	2231	2004	2004
q22	368	328	313	313
Total cold run time: 102483 ms
Total hot run time: 32830 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6206	6192	6263	6192
q2	238	326	234	234
q3	2295	2634	2336	2336
q4	1409	1807	1346	1346
q5	4295	4765	4811	4765
q6	206	183	145	145
q7	2088	1994	1850	1850
q8	2628	2755	2651	2651
q9	7303	7209	7308	7209
q10	3043	3351	2818	2818
q11	589	527	499	499
q12	671	778	607	607
q13	3374	3796	3091	3091
q14	291	290	276	276
q15	566	532	524	524
q16	654	694	647	647
q17	1216	1773	1257	1257
q18	7697	7446	7339	7339
q19	842	1115	1061	1061
q20	1948	1986	1795	1795
q21	5429	5105	4928	4928
q22	619	647	580	580
Total cold run time: 53607 ms
Total hot run time: 52150 ms

@doris-robot
Copy link

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

query1	991	384	381	381
query2	6508	2468	2424	2424
query3	6708	226	213	213
query4	34151	23555	23572	23555
query5	4327	635	461	461
query6	287	213	197	197
query7	4629	500	308	308
query8	315	252	246	246
query9	9520	2741	2732	2732
query10	466	329	246	246
query11	18242	15457	15167	15167
query12	162	115	104	104
query13	1665	524	394	394
query14	11243	7404	7208	7208
query15	235	201	186	186
query16	8149	594	450	450
query17	1551	729	561	561
query18	2108	387	295	295
query19	206	180	152	152
query20	130	111	113	111
query21	203	123	103	103
query22	4437	4565	4349	4349
query23	34391	33212	33706	33212
query24	6401	2253	2320	2253
query25	491	436	386	386
query26	788	274	149	149
query27	2040	455	320	320
query28	5269	2457	2413	2413
query29	686	531	406	406
query30	229	182	151	151
query31	1016	918	837	837
query32	96	62	58	58
query33	533	356	313	313
query34	758	842	527	527
query35	788	835	725	725
query36	1020	1013	959	959
query37	113	107	73	73
query38	4142	4234	4297	4234
query39	1501	1435	1443	1435
query40	207	119	100	100
query41	50	45	46	45
query42	122	106	99	99
query43	542	551	523	523
query44	1313	807	799	799
query45	186	171	162	162
query46	869	1039	647	647
query47	1931	1932	1837	1837
query48	399	402	324	324
query49	733	519	377	377
query50	666	665	383	383
query51	7236	7188	7268	7188
query52	102	98	91	91
query53	220	259	182	182
query54	477	489	404	404
query55	78	81	79	79
query56	258	242	239	239
query57	1211	1204	1126	1126
query58	225	227	241	227
query59	3145	3280	3088	3088
query60	272	272	255	255
query61	114	105	121	105
query62	876	804	778	778
query63	231	198	195	195
query64	3852	992	651	651
query65	3318	3240	3211	3211
query66	869	412	320	320
query67	16078	15899	15687	15687
query68	8017	778	518	518
query69	466	296	249	249
query70	1217	1073	1148	1073
query71	433	284	277	277
query72	5884	3942	3908	3908
query73	677	765	361	361
query74	10001	9189	9162	9162
query75	3986	3168	2593	2593
query76	3621	1191	787	787
query77	762	373	267	267
query78	10199	10176	10091	10091
query79	4201	889	579	579
query80	688	522	463	463
query81	504	276	235	235
query82	635	149	120	120
query83	199	171	152	152
query84	289	94	75	75
query85	815	414	302	302
query86	359	316	304	304
query87	4425	4601	4362	4362
query88	4542	2237	2218	2218
query89	447	343	300	300
query90	1960	188	189	188
query91	131	133	108	108
query92	70	56	53	53
query93	2514	868	527	527
query94	666	385	290	290
query95	337	262	254	254
query96	506	626	280	280
query97	2765	2878	2727	2727
query98	245	206	196	196
query99	1690	1574	1435	1435
Total cold run time: 295326 ms
Total hot run time: 191870 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.07	0.03	0.03
query3	0.24	0.08	0.06
query4	1.62	0.10	0.11
query5	0.43	0.40	0.40
query6	1.17	0.65	0.67
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.58	0.49	0.52
query10	0.55	0.57	0.55
query11	0.15	0.11	0.10
query12	0.14	0.12	0.11
query13	0.61	0.61	0.60
query14	2.83	2.87	2.74
query15	0.89	0.84	0.86
query16	0.37	0.39	0.38
query17	1.04	1.07	1.06
query18	0.23	0.21	0.22
query19	1.89	1.86	1.99
query20	0.02	0.01	0.01
query21	15.37	0.96	0.61
query22	0.77	0.89	0.71
query23	15.10	1.51	0.56
query24	3.51	1.82	1.16
query25	0.14	0.13	0.14
query26	0.30	0.15	0.15
query27	0.06	0.05	0.07
query28	13.82	1.50	1.06
query29	12.57	3.95	3.25
query30	0.26	0.09	0.08
query31	2.82	0.59	0.38
query32	3.25	0.56	0.46
query33	3.11	3.06	3.18
query34	16.69	5.09	4.54
query35	4.53	4.48	4.49
query36	0.67	0.49	0.48
query37	0.10	0.06	0.07
query38	0.05	0.04	0.04
query39	0.03	0.02	0.02
query40	0.17	0.13	0.13
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: 106.39 s
Total hot run time: 31.76 s

@feiniaofeiafei feiniaofeiafei force-pushed the add_monotonic_function3 branch from bb6fccd to 0d61f9b Compare December 27, 2024 10:10
@feiniaofeiafei
Copy link
Contributor Author

run buildall

@feiniaofeiafei feiniaofeiafei force-pushed the add_monotonic_function3 branch from dc0cfb2 to e108b19 Compare December 30, 2024 12:05
@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17578	6174	6049	6049
q2	2052	299	173	173
q3	10652	1241	769	769
q4	10203	873	424	424
q5	7502	2208	1968	1968
q6	204	181	147	147
q7	908	757	612	612
q8	9231	1402	1211	1211
q9	5111	4910	4930	4910
q10	6747	2308	1868	1868
q11	460	287	261	261
q12	350	352	221	221
q13	17772	3575	3000	3000
q14	229	240	219	219
q15	547	499	491	491
q16	648	616	593	593
q17	574	862	326	326
q18	7096	6502	6405	6405
q19	1885	964	570	570
q20	314	322	185	185
q21	2853	2229	1956	1956
q22	368	347	311	311
Total cold run time: 103284 ms
Total hot run time: 32669 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6272	6217	6222	6217
q2	243	326	233	233
q3	2212	2660	2329	2329
q4	1412	1837	1338	1338
q5	4339	4759	4831	4759
q6	188	180	144	144
q7	2077	1977	1806	1806
q8	2631	2819	2721	2721
q9	7382	7404	7327	7327
q10	3107	3398	2809	2809
q11	576	516	500	500
q12	654	763	639	639
q13	3356	3802	3135	3135
q14	300	304	290	290
q15	582	516	492	492
q16	655	701	630	630
q17	1249	1726	1275	1275
q18	7717	7538	7288	7288
q19	871	935	1208	935
q20	2009	2110	1941	1941
q21	5870	5225	4919	4919
q22	649	626	632	626
Total cold run time: 54351 ms
Total hot run time: 52353 ms

@doris-robot
Copy link

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

query1	1311	998	928	928
query2	6511	2407	2249	2249
query3	10923	4735	4888	4735
query4	33030	23747	23464	23464
query5	4728	627	453	453
query6	288	213	192	192
query7	4000	509	311	311
query8	306	254	253	253
query9	9602	2757	2748	2748
query10	471	304	260	260
query11	18044	15394	15180	15180
query12	163	105	104	104
query13	1581	570	440	440
query14	11149	7664	7957	7664
query15	270	204	200	200
query16	8471	606	484	484
query17	1587	798	578	578
query18	2073	426	306	306
query19	210	182	165	165
query20	122	121	118	118
query21	215	126	114	114
query22	4658	4610	4380	4380
query23	35787	33690	33753	33690
query24	6384	2347	2368	2347
query25	471	459	400	400
query26	723	264	157	157
query27	2011	503	341	341
query28	5389	2512	2479	2479
query29	559	529	427	427
query30	214	192	154	154
query31	952	924	835	835
query32	87	64	62	62
query33	472	339	332	332
query34	805	860	550	550
query35	843	828	766	766
query36	1025	1085	973	973
query37	121	103	73	73
query38	4191	4239	4274	4239
query39	1529	1476	1445	1445
query40	229	120	106	106
query41	45	49	42	42
query42	121	113	104	104
query43	536	537	510	510
query44	1367	857	835	835
query45	197	179	168	168
query46	886	1071	679	679
query47	1987	2018	1931	1931
query48	399	424	328	328
query49	693	490	389	389
query50	654	672	418	418
query51	7287	7351	7101	7101
query52	104	102	92	92
query53	240	268	187	187
query54	492	507	407	407
query55	82	78	82	78
query56	260	261	244	244
query57	1248	1237	1208	1208
query58	239	229	224	224
query59	3136	3374	3044	3044
query60	281	299	255	255
query61	120	132	108	108
query62	854	844	783	783
query63	227	199	204	199
query64	3289	1051	658	658
query65	3305	3332	3251	3251
query66	717	443	310	310
query67	16557	16000	15523	15523
query68	10368	780	527	527
query69	468	300	258	258
query70	1259	1126	1081	1081
query71	427	286	259	259
query72	6204	3906	3783	3783
query73	2078	764	357	357
query74	9727	9297	8751	8751
query75	4638	3174	2667	2667
query76	5669	1232	796	796
query77	1031	364	282	282
query78	9992	10259	9496	9496
query79	2768	841	596	596
query80	731	515	437	437
query81	484	272	234	234
query82	205	148	122	122
query83	194	160	139	139
query84	291	91	71	71
query85	881	353	303	303
query86	344	319	301	301
query87	4449	4532	4467	4467
query88	3303	2249	2219	2219
query89	420	333	299	299
query90	2122	187	183	183
query91	134	132	105	105
query92	65	55	49	49
query93	2119	905	540	540
query94	690	408	297	297
query95	320	268	245	245
query96	492	617	273	273
query97	2764	2811	2686	2686
query98	226	199	195	195
query99	1635	1529	1421	1421
Total cold run time: 303326 ms
Total hot run time: 197217 ms

}

@Override
public boolean isMonotonic(Literal lower, Literal upper) {
Copy link
Contributor

Choose a reason for hiding this comment

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

pls add consideration here

import org.apache.doris.nereids.trees.expressions.literal.BigIntLiteral;
import org.apache.doris.nereids.trees.expressions.literal.Literal;

/** monotonicity for from_xx */
Copy link
Contributor

Choose a reason for hiding this comment

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

from_xx => from_{xx}second ?

@@ -41,7 +42,7 @@
*/
public class WeeksAdd extends ScalarFunction
implements BinaryExpression, ExplicitlyCastableSignature,
ComputeSignatureForDateArithmetic, PropagateNullableOnDateLikeV2Args {
ComputeSignatureForDateArithmetic, PropagateNullableOnDateLikeV2Args, DateAddSubMonotonic {
Copy link
Contributor

Choose a reason for hiding this comment

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

consider more strict DateAddSubMonotonic with non-literal child-0 definition?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the first child is a constant, it will not affect the calculation of partition pruning. Consider the date_trunc('2024-01-01', 'day') function. If constant folding is turned on, the calculation logic of partition pruning will not be entered; if constant folding is turned off, the range returned by '2024-01-01' to the upper-level expression is empty. In this case, the range calculation will not be performed on this function, and the wrong partition pruning result will not be calculated.

@feiniaofeiafei feiniaofeiafei force-pushed the add_monotonic_function3 branch from 07d0a95 to 440cd91 Compare January 2, 2025 09:33
@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17564	6162	6029	6029
q2	2042	294	177	177
q3	10421	1200	762	762
q4	10222	866	441	441
q5	7795	2182	1953	1953
q6	205	185	152	152
q7	902	761	607	607
q8	9236	1366	1104	1104
q9	5208	4960	4935	4935
q10	6758	2316	1869	1869
q11	496	280	259	259
q12	344	370	227	227
q13	17804	3500	2987	2987
q14	229	232	216	216
q15	573	515	491	491
q16	633	608	587	587
q17	581	848	341	341
q18	6893	6498	6476	6476
q19	1545	972	577	577
q20	314	321	195	195
q21	2854	2249	1982	1982
q22	359	336	307	307
Total cold run time: 102978 ms
Total hot run time: 32674 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6217	6204	6196	6196
q2	240	327	230	230
q3	2245	2686	2312	2312
q4	1456	1803	1338	1338
q5	4365	4766	4787	4766
q6	181	180	146	146
q7	2088	1918	1834	1834
q8	2612	2836	2717	2717
q9	7403	7189	7293	7189
q10	3088	3374	2882	2882
q11	580	525	492	492
q12	667	736	605	605
q13	3389	3745	3070	3070
q14	300	307	272	272
q15	563	519	523	519
q16	669	692	657	657
q17	1231	1720	1263	1263
q18	7536	7419	7414	7414
q19	830	1133	1098	1098
q20	1938	1991	1921	1921
q21	5678	5327	4878	4878
q22	635	626	602	602
Total cold run time: 53911 ms
Total hot run time: 52401 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 196680 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 440cd9109e9ccf1031d301b6c10b9c3316a61ddf, data reload: false

query1	1280	938	933	933
query2	6492	2514	2397	2397
query3	10948	4601	4729	4601
query4	33333	23723	23542	23542
query5	4356	637	443	443
query6	284	211	194	194
query7	3984	490	306	306
query8	289	250	224	224
query9	9346	2591	2617	2591
query10	494	303	237	237
query11	17785	15319	15060	15060
query12	154	103	100	100
query13	1548	525	408	408
query14	9758	7779	7309	7309
query15	240	208	189	189
query16	8513	590	404	404
query17	1596	753	576	576
query18	2130	419	304	304
query19	207	180	154	154
query20	113	120	110	110
query21	208	136	107	107
query22	4801	4755	4587	4587
query23	34578	33542	33516	33516
query24	6725	2490	2375	2375
query25	499	496	423	423
query26	852	287	161	161
query27	2369	473	343	343
query28	5353	2470	2439	2439
query29	670	604	424	424
query30	203	181	146	146
query31	972	928	853	853
query32	79	61	62	61
query33	479	357	292	292
query34	788	856	507	507
query35	826	824	761	761
query36	1047	1043	981	981
query37	107	92	71	71
query38	4412	4339	4153	4153
query39	1531	1476	1443	1443
query40	203	119	99	99
query41	45	42	44	42
query42	124	104	104	104
query43	530	528	506	506
query44	1382	828	837	828
query45	184	187	169	169
query46	896	1079	659	659
query47	1988	2010	1921	1921
query48	385	414	347	347
query49	729	479	398	398
query50	654	670	408	408
query51	7245	7286	7116	7116
query52	105	101	93	93
query53	235	255	188	188
query54	481	490	414	414
query55	91	85	88	85
query56	264	260	249	249
query57	1250	1252	1150	1150
query58	241	220	231	220
query59	3265	3371	3462	3371
query60	280	271	252	252
query61	107	104	103	103
query62	883	830	744	744
query63	233	198	194	194
query64	2982	1049	710	710
query65	3319	3219	3285	3219
query66	802	405	294	294
query67	16620	15818	15565	15565
query68	8127	698	522	522
query69	471	273	260	260
query70	1205	1175	1116	1116
query71	439	290	248	248
query72	6507	4084	3812	3812
query73	652	762	366	366
query74	10219	9297	8863	8863
query75	3983	3149	2703	2703
query76	3707	1165	764	764
query77	752	380	269	269
query78	10271	9931	9460	9460
query79	3020	817	588	588
query80	594	511	416	416
query81	467	272	279	272
query82	629	142	127	127
query83	170	159	144	144
query84	246	91	73	73
query85	794	373	313	313
query86	358	320	301	301
query87	4625	4449	4403	4403
query88	4445	2174	2153	2153
query89	416	330	299	299
query90	1870	188	201	188
query91	126	131	101	101
query92	63	60	50	50
query93	1641	871	538	538
query94	653	398	283	283
query95	335	271	244	244
query96	481	602	281	281
query97	2770	2834	2708	2708
query98	228	211	201	201
query99	1778	1568	1441	1441
Total cold run time: 296914 ms
Total hot run time: 196680 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.08	0.03	0.03
query3	0.23	0.07	0.07
query4	1.61	0.10	0.10
query5	0.42	0.43	0.40
query6	1.15	0.65	0.66
query7	0.03	0.02	0.01
query8	0.04	0.03	0.03
query9	0.59	0.51	0.52
query10	0.56	0.56	0.56
query11	0.13	0.10	0.11
query12	0.13	0.10	0.10
query13	0.62	0.59	0.59
query14	2.73	2.74	2.75
query15	0.90	0.83	0.84
query16	0.38	0.38	0.38
query17	1.06	1.07	1.03
query18	0.23	0.22	0.21
query19	1.94	1.80	2.04
query20	0.02	0.01	0.01
query21	15.36	0.98	0.59
query22	0.76	0.69	0.69
query23	15.35	1.44	0.54
query24	2.94	0.59	1.64
query25	0.17	0.15	0.11
query26	0.29	0.15	0.14
query27	0.05	0.05	0.05
query28	13.53	1.53	1.05
query29	12.58	3.95	3.27
query30	0.24	0.09	0.06
query31	2.82	0.60	0.37
query32	3.22	0.53	0.45
query33	3.06	3.09	3.11
query34	16.67	5.08	4.45
query35	4.48	4.46	4.47
query36	0.65	0.47	0.48
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.04	0.02	0.02
query40	0.17	0.15	0.13
query41	0.08	0.03	0.02
query42	0.04	0.02	0.02
query43	0.04	0.04	0.03
Total cold run time: 105.56 s
Total hot run time: 30.87 s

@feiniaofeiafei
Copy link
Contributor Author

run p0

@feiniaofeiafei
Copy link
Contributor Author

run cloud_p0

Copy link
Contributor

github-actions bot commented Jan 3, 2025

PR approved by anyone and no changes requested.

@feiniaofeiafei
Copy link
Contributor Author

run cloud_p0

Copy link
Contributor

github-actions bot commented Jan 3, 2025

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

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jan 3, 2025
@morrySnow morrySnow merged commit 9bbf679 into apache:master Jan 3, 2025
25 checks passed
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. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants